Skip to content

Instantly share code, notes, and snippets.

@bcameron1231
Last active June 20, 2018 13:25
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 bcameron1231/6df207182d18e920a91701ddead505b5 to your computer and use it in GitHub Desktop.
Save bcameron1231/6df207182d18e920a91701ddead505b5 to your computer and use it in GitHub Desktop.
$credentials = Get-Credential
Connect-PnPOnline "https://yoursite.sharepoint.com/sites/Hubsite" -Credentials $credentials
$context = Get-PnPContext
$web = Get-PnPWeb
$context.Load($web)
Execute-PnPQuery
$ca = $web.UserCustomActions.Add()
$ca.ClientSideComponentId = "1859a5f8-d2fc-4c55-91ba-a097edf6da00"
$ca.ClientSideComponentProperties = "{""NavHeading"":""Sites""}"
$ca.Location = "ClientSideExtension.ApplicationCustomizer"
$ca.Name = "ReactHubsiteNavbarApplicationCustomizer"
$ca.Title = "ReactHubsiteNavbarApplicationCustomizer"
$ca.Description = "Custom action for Tenant Global NavBar Application Customizer"
$ca.Update()
$context.Load($web.UserCustomActions)
Execute-PnPQuery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment