Open kasperbolarsen opened 5 years ago
I'm having trouble building the latest bits, but my best guess is that we'll need to update the AddFolder.cs in the PowerShell solution to write the created folder to the pipeline. The PnP-Sites-Core solution returns the folder, but the PowerShell solutions doesn't write it to the pipeline at the moment.
Maybe something like this?
I second this. I am working on a script that creates folders based on a column value of files and moves them into those folders. However, some of the column values have characters that are not allowed in folder names, so in order to move the file into the new folder I need to manually create the target folder name to match what Add-PnPFolder created it as. It would be nice if the command returned at least the name of the folder (but of course more data would be useful).
I created a PR with the change at https://github.com/SharePoint/PnP-PowerShell/pull/2463
This issue can be closed now as the functionality is included in https://github.com/SharePoint/PnP-PowerShell/releases/tag/3.18.2002.0 release
In order to align behavior with Add-PnPField and similar commands I would expect this command to return the new object
Expected behavior
$newfold = Add-PnPFolder -Name FolderA -Folder Documents
Actual behavior
Add-PnPFolder returns nothing
Which version of the PnP-PowerShell Cmdlets are you using?
What is the version of the Cmdlet module you are running?
3.6.1902.2
How did you install the PnP-PowerShell Cmdlets?