02-08-2019 05:08 AM
02-11-2019 04:04 AM - edited 02-11-2019 04:40 AM
Thanks, but how do I provide credentials to this module?
I've opened the SharePoint Online Module and logged in, than imported the module and ran the command from the scripts comments, but I always get the information pop to provide credentials but at no point do I get to enter any credentials.
I've managed to get the script to run, but I can't produce any changes to my navigation unfortunately. No Idea why.
@Juan Carlos González Martínthanks for your input. My PowerShell skills are limited to basic administration and some modifying of existing scripts. I can get the navigation links but I have no idea how to export or copy those :(
02-20-2019 11:00 PM
05-25-2020 05:28 AM
However, it was only copying non-hyperlinked headings. So I had to add an "-external" switch to get any hyperlinked menu items to copy. This is noted in the article above but better detailed in this second article below:
06-10-2020 02:32 AM
You can use the Copy-PNPNavigation module
You can copy a SharePoint Navigation Menu with maximum 3-layer with this script. Also, you will have a export in excel type from the site navigation!
09-30-2020 04:16 PM
@Saeid_Abdollahzadeh I just ran this module and got the following message "Backup process is done, you can find the back up file in the destination folder" and "You skip the restore process". Currently, I cannot find the backup excel file and the navigation in the destination site was not changed. Any idea what I'm missing here? Thanks
09-30-2020 11:35 PM
Copy-PNPNavigation -SourceSite https://contoso.sharepoint.com/sites/SourceSite -BackupDestination C:\FolderOfBackupFile -DestinationSite https://contoso.sharepoint.com/sites/DestinationSite -NavigationLocation TopNavigationBar
It's the full line of the command. You have to enter the source site address, which you want to copy the navigation from it, then you need to enter the destination folder where the backup file will save there. If you're going to add the navigation menu to the destination site, you have to use the -DestinationSite switch, otherwise the backup file doesn't copy to the destination site, and you have the backup file only!
10-01-2020 08:15 AM
@Saeid_Abdollahzadeh Hi Saeid, thanks so much for your reply and the clarification. When running the command, I now get an error 'D:\SiteNavigationBackup.xlsx' file not found. When viewing the directory, the backup file was never written. Am I missing something?
10-02-2020 01:08 AM
Hi again @Darren_Smith
I suggested that you use a specific folder instead of the drive path for the backup file! for example:
Copy-PNPNavigation -SourceSite https://YourSourceSite.sharepoint.com -BackupDestination C:\Backup -DestinationSite https://YourDestinationSite.sharepoint.com/sites/TEST -NavigationLocation TopNavigationBar
You will see the "SiteNavigationBackup.xlsx" in the Backup folder!
It should be fixed by this command!
Also, make sure that you use version 1.0.2
good luck :)