Skip to content

Commit bd446eb

Browse files
authored
Script added
1 parent 9e411f0 commit bd446eb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

EnableCustomScripts.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Import-Module PnP.PowerShell
2+
3+
# Authentication
4+
Connect-PnPOnline -Url "https://YOURTENANT.sharepoint.com" -ClientId <CLIENTID> -ClientSecret <CLIENTSECRET> -WarningAction Ignore
5+
6+
# Enable custom scripts on sites
7+
Set-PnPSite -Url "https://YOURTENANT.sharepoint.com/" -DenyAddAndCustomizePages $false
8+
Set-PnPSite -Url "https://YOURTENANT.sharepoint.com/sites/MYSITE" -DenyAddAndCustomizePages $false

0 commit comments

Comments
 (0)