Forum Discussion
María José Pedreira
Apr 26, 2017Brass Contributor
Upload Published Files using Add-PnPFile
Hi all, I have to upload a file and next command works fine: Add-PnPFile -Path $file -Folder "/Pages" -Web $subweb -Values @{Title=$subweb.Title} After upload the file, I get information ab...
María José Pedreira
Brass Contributor
After trying several posibilities eventually I got it with
Add-PnPPublishingPage -PageName 'MyCustomName'
-Web $subweb
-Title $subweb.Title
-PageTemplateName 'MyCustomLayout'
-Publish
Khalid Hajjouji
Jul 10, 2018Copper Contributor
Try the "-Checkout" property. For example:
Add-PnPFile -Path ".\dummyPage.aspx" -Folder "Pages" -Checkout:$true -Publish:$true -PublishComment "PnP provisioned page"