Replies: 2 comments 3 replies
-
I think the page name in your example, would be " Have you tried something like:
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have changed over from SharePointPnPPowerShellOnline to PnP.PowerShell v1.4 and it appears I am no longer able to create a site page that has a URL with spaces.
Example:
$CompanyName = 'test page'
Add-PnPPage -Name $CompanyName -CommentsEnabled:$false
Set-PnPPage -Identity $CompanyName -HeaderType None
What will happen is the site page will be created with a URL such as test-page or test+page. Due to the addition of the '-' or '+' the set page will fail as the company name no longer matches.
Is this expected behavior? I also tried adding '%20' for the space on the add-pnppage, but that leads to a "Object reference not set to an instance of an object." error.
Additonal info, I am running PnP.Powershell in Powershell v5.1.
Beta Was this translation helpful? Give feedback.
All reactions