pnp / powershell

PnP PowerShell
https://pnp.github.io/powershell
MIT License
655 stars 337 forks source link

[FEATURE] Copy-PnPFile - including option to set default values for copied files as set in folder default value settings #834

Open ollij opened 3 years ago

ollij commented 3 years ago

Is your feature request related to a problem? Please describe. I am implementing a small customization in a document management solution. We create new folders (ex. for a project) and set column default value settings. We also copy template files/folders under the newly folder. The problem is that Copy-PnPFile does not set the default values for newly copied documents following the column default value settings in the new folder.

Describe the solution you'd like It would be really useful to have -SetDefaultValues switch in Copy-PnPFile commandlet. When present, it would set the column default values as they are set for the folder.

Describe alternatives you've considered Copying files using Logics apps, but it is way more complicated in this scenario than using Copy-PNPFile, and I haven't tested does that set the column default values correctly or not.

Additional context Context of this Feature request is Document management solutions using SharePoint Document libraries customized with PnP PowerShell.

NickDorak commented 7 months ago

Or at least Copy-PnPItem should return GUID of new/destination item, so that other commands can be run after against new/destination items.