Closed hinek closed 4 years ago
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Hi, I couldn't reproduce this error in SPO. Looking through the code the exception should only be thrown if the Name includes any of these characters: [""#%*:<>?/\|\t\r\n]
. Note that in SharePoint on-premises the ampersand is not allowed: [~#%&*{}\:<>?/|""\t\r\n]
.
Have you tried escaping the ampersand, e.g. "Test `& Repeat"
Thank you, escaping like in your example did the trick.
Using a "&" in a provisioning template, produces the same error. Escaping like "%26" … does not help. Creating the folder manually in SharePoint Online and than calling Get-PnPListItem -List "12345" retrieves a blank title.
Reporting an Issue or Missing Feature
Issue
Expected behavior
For SharePoint Online, Add-PnPFolder should be able to create a folder, that contains an ampersand (&). You can create a folder like this using UI and using Resolve-PnPFolder.
Actual behavior
Cmdlet fails with the following error message: Add-PnPFolder : The argument must be a single folder name and cannot contain path characters. Parametername: folderName
Steps to reproduce behavior
Which version of the PnP-PowerShell Cmdlets are you using?
What is the version of the Cmdlet module you are running?
3.16.1912.0
How did you install the PnP-PowerShell Cmdlets?