Skip to content

Commit 885b738

Browse files
committed
doc updates now that PnPPS December has been released
1 parent 6d968ff commit 885b738

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

docs/transform/modernize-userinterface-site-pages-powershell.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,28 @@ ms.prod: sharepoint
1313
The page transformation engine can also be used from PowerShell. This allows it to be integrated in a site modernization script that besides page transformation also does other things like installing solution, connecting the site to an Office 365 group and applying tenant branding. A good example of an all-up modernization script can be found [in the Office 365 Group connect article](modernize-connect-to-office365-group.md).
1414

1515
> [!IMPORTANT]
16-
> To use PowerShell it's important to have all the needed binaries together in one folder. The easiest solution is to download the latest version and all dependencies from the shared [SharePointPnP.Modernization binary package](https://github.com/SharePoint/sp-dev-modernization/blob/master/Tools/SharePoint.Modernization/Scripts/PageTransformation/SharePointPnP.Modernization.v1.0.1811.2%20binaries.zip?raw=true). Another way to get this list of binaries is to use Visual Studio, add the [SharePointPnPModernizationOnline](https://www.nuget.org/packages/SharePointPnPModernizationOnline) package and build the solution. Once that's done you can find the needed binaries in the solution's bin folder.
16+
> Below scripts shows how to transform pages. It requires [PnP PowerShell](https://aka.ms/sppnp-powershell) version 3.4.1812.0 (December 2018 release) or higher.
1717
18-
Below script shows how to call the transformation engine using [PnP PowerShell](http://aka.ms/sppnp-powershell):
18+
[!code-powershell[transformpages](../../sp-dev-modernization/Scripts/PageTransformation/TransformPageSample.ps1 "Transform pages to modern pages using PowerShell")]
1919

20-
[!code-powershell[transformpages](../../sp-dev-modernization/Scripts/PageTransformation/TransformPageSampleBasic.ps1 "Transform pages to modern pages using PowerShell")]
20+
## Options for the ConvertTo-PnPClientSidePage cmdlet
2121

22-
## Options for the Invoke-PnPModernizationPageTransformation cmdlet
23-
24-
The **Invoke-PnPModernizationPageTransformation** cmdlet is the key cmdlet to modernize a given page. Below table lists the command line parameters that you can use to control the page transformation via this cmdlet.
22+
The **ConvertTo-PnPClientSidePage** cmdlet is the key cmdlet to modernize a given page. Below table lists the command line parameters that you can use to control the page transformation via this cmdlet.
2523

2624
Parameter | Default | Description
2725
----------|---------|------------
28-
Page (*) | | The page in the format of a ListItem that will need to be transformed
29-
WebPartMappingFile (*) | | Page transformation is driven by a mapping file. The earlier explained approaches to get the needed binaries will also give you the default web part mapping file (`webpartmapping.xml`) which you can reference and optionally tweak. to fit your page transformation needs (e.g. transforming to 3rd party custom web parts).
30-
Overwrite | $false | When you configure `Overwrite = $true` then the page transformation framework will overwrite the target page if needed. By default the new page name has a prefix of Migrated_, which then implies that if Migrated_YourPage.aspx already exists (typically from a previous page transformation effort) it will be overwritten.
31-
AddPageAcceptBanner | $false | Setting this option will make the page transformation framework put the configured PageAcceptBanner web part on top of the created modern page. Using this web part the users accessing the page can decide whether they want to keep or discard the created modern page. See the [Page Transformation UI](modernize-userinterface-site-pages-ui.md) article to learn more on how to install and configure the default page banner web part.
32-
HandleWikiImagesAndVideos | $true | A wiki page can contain embedded video and text which is not possible in a modern text part. By default the wiki text will be split at each embedded image or video, a video or image web part will be added to the modern page and then the remainder of the original text. If you don't like this automatic fixing you can set this option to false which will result in each embedded image and video being replaced by a text placeholder combined with individual video and image web pars at the bottom of the page.
33-
ReplaceHomePageWithDefaultHomePage | $false | The default behavior is to transform your site's home page to a modern page like any other regular page. If you set this option to true then a site's home page will be transformed to a 'default' out-of-the-box modern home page, so the one you would get with a newly created modern team site.
34-
TargetPageTakesSourcePageName | $false | The default behavior is to give the created modern page a name that starts with the prefix Migrated_ and let the original page keep it's existing name. When this option is specified the newly created page gets the name of the original page and the original page is renamed with a prefix Previous_. Set this option if you're sure you want to move forward with the modern page as it will ensure that all links pointing the original page now result in the new modern page being loaded.
26+
Identity (*) | | The page name (e.g. pageA.aspx)
27+
WebPartMappingFile | | Page transformation is driven by a mapping file. The cmdlet has a default mapping file embedded, but you can also specify your custom web part mapping file (`webpartmapping.xml`) to fit your page transformation needs (e.g. transforming to 3rd party custom web parts). You do this by specifying the path to the file via the `-WebPartMappingFile` parameter.
28+
Overwrite | $false | When you add `-Overwrite` then the page transformation framework will overwrite the target page if needed. By default the new page name has a prefix of Migrated_, which then implies that if Migrated_YourPage.aspx already exists (typically from a previous page transformation effort) it will be overwritten.
29+
AddPageAcceptBanner | $false | Using `-AddPageAcceptBanner` will make the page transformation framework put the configured PageAcceptBanner web part on top of the created modern page. Using this web part the users accessing the page can decide whether they want to keep or discard the created modern page. See the [Page Transformation UI](modernize-userinterface-site-pages-ui.md) article to learn more on how to install and configure the default page banner web part.
30+
ReplaceHomePageWithDefault | $false | The default behavior is to transform your site's home page to a modern page like any other regular page. If you use `-ReplaceHomeWithDefault` then a site's home page will be transformed to a 'default' out-of-the-box modern home page, so the one you would get with a newly created modern team site.
31+
TakeSourcePageName | $false | The default behavior is to give the created modern page a name that starts with the prefix Migrated_ and let the original page keep it's existing name. When `-TakeSourcePageName` is specified the newly created page gets the name of the original page and the original page is renamed with a prefix Previous_. Set this option if you're sure you want to move forward with the modern page as it will ensure that all links pointing the original page now result in the new modern page being loaded.
3532

3633
(*) Mandatory command line parameter
3734

3835
## FAQ
3936

40-
### I choose the "AddPageAcceptBanner" option but don't see the banner web part on the created pages
37+
### I used the "AddPageAcceptBanner" switch but don't see the banner web part on the created pages
4138

4239
In order to make the banner webpart work there are 2 requirements that have to be met:
4340

0 commit comments

Comments
 (0)