Instantly share code, notes, and snippets.

Embed
What would you like to do?
function Clear-PermissionsInProvisioningTemplate{
$template = Load-PnPProvisioningTemplate -Path $rootsiteTemplateFileName
$template.Security.AdditionalAdministrators.Clear()
$template.Security.AdditionalMembers.Clear()
$template.Security.AdditionalOwners.Clear()
$template.Security.AdditionalVisitors.Clear()
Save-PnPProvisioningTemplate -Out $rootsiteTemplateFileName -InputInstance $template -Force
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment