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

Popular posts from this blog

Developing Custom workflows in SharePoint 2007 using Visual Studio 2005

Sharepoint 2010:ECMA script to retrieve list data

Tabs for sharepoint list forms using Jquery