Check if "Custom scripts are disabled for the site" using PNP PowerShell
cls
$error.Clear()
#Portal url
$SiteURL= "url of the site"
Connect-PnPOnline -Url $SiteURL (your credentials)
$site = Get-PnPSite
if ($site.DenyAddAndCustomizePages -eq "Disabled") {
Write-Output "Custom scripts are enabled for the site."
}
else {
Write-Output "Custom scripts are disabled for the site."
}
Comments
Post a Comment