PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,915 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I can use Add-PnPFolder to add a folder to the Shared Documents library but receives the follow error message "Add-PnPFolder : File Not Found." when attempting to add a folder to any other document library.
I have a csv file with a list of libraries that I want to add a specific folder to:
ForEach($row in $csv)
{
Write-Host -f Yellow "Adding" $row.Folder "to" $row.Library
# Add-PnPFolder -Name $row.Folder -Folder $row.Library
}
Error:
Add-PnPFolder : File Not Found.
At line:1 char:9
Add-PnPFolder -Name $row.Library -Folder $row.Folder
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Works just fine!! No errors.
ForEach($row in $csv)
{
Write-Host -f Yellow "Adding" $row.Folder "to" $row.Library
Add-PnPFolder -Name $row.Folder -Folder "Shared Documents"
}