Skip to content

Instantly share code, notes, and snippets.

@luismanez
Created January 27, 2018 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luismanez/eaf90963d725f635546f5d825d3f325f to your computer and use it in GitHub Desktop.
Save luismanez/eaf90963d725f635546f5d825d3f325f to your computer and use it in GitHub Desktop.
Connect-PnPOnline -url $webUrl
$template = Load-PnPProvisioningTemplate -Path ".../template.xml"
$parser = New-Object OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.TokenParser($web, $template);
$template.CustomActions.SiteCustomActions |
Where-Object {$_.RegistrationId -ne $null} |
ForEach-Object {$_.RegistrationId = $parser.ParseString($_.RegistrationId)}
$template.ToXml() | Out-File ".../update-pnp-template-after-token-parser.xml"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment