Forum Discussion
Converting classic pages to modern
An_admin_123 Try installing latest version of PnP PowerShell and then use ConvertTo-PnPPage cmdlet.
Follow documentations:
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
For SharePoint/Power Platform blogs, visit: Ganesh Sanap Blogs
- An_admin_123Apr 14, 2023Copper ContributorI just get a different error message:
"List 'sitepages' does not exist at site"- ganeshsanapApr 17, 2023MVP
An_admin_123 Can you show us the complete PowerShell code you are using currently?
Did you check in "Site Contents" of site for "Site Pages" library? Is it available on your SharePoint site?
If yes and you are referring to library using title/display name anywhere in your code, try using "Site Pages" instead of "SitePages".
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
For SharePoint/Power Platform blogs, visit: Ganesh Sanap Blogs
- An_admin_123Apr 18, 2023Copper Contributorhttps://learn.microsoft.com/en-us/sharepoint/dev/transform/modernize-userinterface-site-pages-powershell
I took the script from there and tried to use it. Of course, I'm not a programmer (or interested in being one) so it's all a little out of my usual scope. I only changed the address it points at.
The line
$pages = Get-PnPListItem -List sitepages -PageSize 500
seems relevant. If I change sitepages to site pages it says:
A positional parameter cannot be found that accepts argument 'pages'.
I have a "Site Pages" page library in Site Contents.