-
Notifications
You must be signed in to change notification settings - Fork 394
Add Copy-PnPFileMetadata cmdlet and docs #5072
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Please ignore this for a few hours, I am working on some perf optimizations and simplifications. Will put another comment in when I am done. |
|
OK, hopefully that's done. Ready for review :) |
|
Very nice one! Thank you very much! |
|
Good morning team, This is my first post in this GitHub repository, or github in general, so my apologies if i should post this comment as a new issue. I was just looking for confirmation if this cmdlet supports subsites because I'm having some issues getting it to copy metadata from one to a new site. Below is the code I'm running, with the domain name and client id redacted in the connection. When I attempt to run this, it comes back saying the source path '/sites/retailfacilities/shared documents/manuals' not found. I've tried changing the src connection to just https://xyz.sharepoint.com and then in the "Copy" command I used /sites/storeengineering/retailfacilities/Shared Documents/Manuals Any guidance is greatly appreciated. If I can get this command to run, this will truly be a lifesaver for me as I work on promoting subsites to their own site. |
|
Hmm.. Are you sure the path for the documents is actually 'Shared Documents' and not just 'Documents'? Edit: on desktop now, and I see you're using a subsite. Didn't catch that at first, but for a subsite I think you should be connecting to the parent site and including the subsite in the path. Can you give that a try? @tborchardt I will review this later, confirm, and update docs if necessary. |
I was able to confirm that we need to connect to the parent site and then include the subsite in the path. It was able to successfully copy the default fields, except the user mapped ones. It says, "Applied non-user fields after user mapping failure." after each file it copied metadata for. |
|
So happy you worked on this, being unable to achieve these fields update has been killing me in the last week using all sorts of context like PNP/CSOM. I know i can do it with REST but it's heavy (i'm a beginner). |
Type
Related Issues?
#5071
What is in this Pull Request ?
Copy-PnPFileMetadata cmdlet and docs