Replies: 1 comment 3 replies
|
Seems like an issue with your script , maybe try updating to the latest version of PnP PowerShell and try ? Also, maybe uninstall old versions of PnP PowerShell , sometimes it loads older versions , cant repro |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Please confirm what it is that your reporting
Since updating PowerShell to v.7.6.3, the commandlet Copy-PnPFileMetadata has stopped working as expected.
Expected behavior
Commandlet should copy file metadata from the source to the destination
Actual behavior
The script I've been using was working fine last week, but is no longer working since updating to Powershell 7.6.3.
Error message:
"Copy-PnPFileMetadata: You are not signed in. Please use Connect-PnPOnline to connect."
Steps to reproduce behavior
PS /Users/ben-mba> Update-Module PnP.PowerShell
PS /Users/ben-mba>
PS /Users/ben-mba> $SourceSiteUrl = "https://redacted.sharepoint.com/sites/2021ProjectsandProposal" PS /Users/ben-mba> $TargetSiteUrl = "https://redacted.sharepoint.com/sites/Masterprojectdatabase"
PS /Users/ben-mba>
PS /Users/ben-mba> # Site-relative source library root
PS /Users/ben-mba> $SourceLibraryRootSiteRelative = "Shared Documents"
PS /Users/ben-mba>
PS /Users/ben-mba> # Server-relative source library root
PS /Users/ben-mba> $SourceLibraryRootServerRelative = "/sites/2021ProjectsandProposal/Shared Documents"
PS /Users/ben-mba>
PS /Users/ben-mba> # Site-relative destination folder in the target site
PS /Users/ben-mba> $TargetFolderSiteRelative = "Shared Documents/2021 Projects and Proposals"
PS /Users/ben-mba>
PS /Users/ben-mba> # Server-relative destination folder, used by Copy-PnPFile
PS /Users/ben-mba> $TargetFolderServerRelative = "/sites/Masterprojectdatabase/Shared Documents/2021 Projects and Proposals"
PS /Users/ben-mba>
PS /Users/ben-mba> $sourceConn = Connect-PnPOnline `
Copy-PnPFileMetadata: You are not signed in. Please use Connect-PnPOnline to connect.
PS /Users/ben-mba>
Checking Entra shows that the Connect-PnPOnline sign-ins are successful, and this is reinforced by the fact that I can successfully copy the files / folders between the two sites immediately prior to trying to copy the metadata.
What is the version of the Cmdlet module you are running?
(you can retrieve this by executing
Get-Module -Name "PnP.PowerShell" -ListAvailable)Version 3.2.0
Which operating system/environment are you running PnP PowerShell on?
MacOS
All reactions