Description
Category
- Bug
Describe the bug
Im trying to migrate a classic site into a modern one. I already have the connected 365 group and i can use modern lists and libraries. But i have pages, like the homepage that are classic and when this page is displayed the menu is the classic one too so the user is confused. I dont want to migrate any of those pages, i tried and get other errors so i delete all of them. Now, im trying to create a new modern page using PnP. Im using command Add-PnPPage.
Steps to reproduce
DELETE THIS LINE BEFORE SUBMITTING - Provide steps to reproduce the behavior:
- Im using powershell 7 and PnP installed yesterday version 2.4.0
- Auth using
Connect-PnPOnline -Url "https://----.sharepoint.com/calidad" -Credential (Get-Credential)
- Execute command
$pagename = "Welcome"
- Execute command
$page = Add-PnPPage -Name $pagename -LayoutType Home
- See error:
Add-PnPPage: Object reference not set to an instance of an object.
Expected behavior
The modern page to be created. A file is created instead but is corrupted.
Environment details (development & target environment)
- SDK version: 2.4.0
- OS: Windows 11
Additional context
What i want to achieve is my users only have to see one menu, and not be changing between different designs. I can't recreate the entire site because it has a lot of list with powerautomate flows.