[FEATURE] Added the Folder parameter to Add-PnPDocumentSet#4029
[FEATURE] Added the Folder parameter to Add-PnPDocumentSet#4029gautamdsheth merged 3 commits intopnp:devfrom
Conversation
gautamdsheth
left a comment
There was a problem hiding this comment.
Need to use the implementation that we have in Add-PnPFolder for folder parameter
| public string Name; | ||
|
|
||
| [Parameter(Mandatory = false)] | ||
| public string Folder; |
There was a problem hiding this comment.
Can you please modify this to use FolderPipeBind ? You can check & copy over the implementation that we have in Add-PnPFolder cmdlet, would make things easier and consistent for users
There was a problem hiding this comment.
Thanks @gautamdsheth I can update this, however I used the logic in Add-PnPListItem which will create the folder if it doesn't exist. It also uses the relative path from the List.RootFolder e.g. "Folder A/Folder B" as in this command we are specifying the List already which makes sense rather than having to repeat the List name/path in the FolderPipeBand e.g. "Shared Documents/Folder A/Folder B"
There was a problem hiding this comment.
@danielcecil - will merge it and make some changes later. The advantage of pipebind is that we can easily use it with Get-PnPFolder or related cmdlets. If you notice the code, it does create the folder if it doesn't exist in that cmdlet.
Before creating a pull request, make sure that you have read the contribution file located at
https://github.com/pnp/powerShell/blob/dev/CONTRIBUTING.md
Type
Related Issues?
Fixes #4022
What is in this Pull Request ?
Adds a String -Folder parameter to the command, similar to Add-PnPListItem. Folder is created if needed.
Includes updated documentation too