Created
August 29, 2017 20:04
-
-
Save tiagoduarte/4e5e40bd19c29ed7d16e5412445f09e3 to your computer and use it in GitHub Desktop.
SharePoint Designer in Office 365
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#params | |
$username = "admin@contoso.onmicrosoft.com" | |
$password = "myPWD" | |
$url = "https://contoso.sharepoint.com" | |
$adminUrl = "https://contoso-admin.sharepoint.com" | |
$spd = 0#0-deny disabled; 1-deny enabled | |
#connect to SPO | |
$securePassword = ConvertTo-SecureString $password -AsPlainText -force | |
$credential = New-Object System.Management.Automation.PsCredential($username, $securePassword) | |
Connect-SPOService -Url $adminUrl -Credential $credential | |
#enable SPD | |
write-host ("SharePoint Designer Protection: " +(Get-SPOsite $url).DenyAddAndCustomizePages) | |
Set-SPOsite $url -DenyAddAndCustomizePages $spd | |
write-host ("SharePoint Designer Protection: " +(Get-SPOsite $url).DenyAddAndCustomizePages) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment