Dear
start
Thank you very
much
Fahadullah Karimi
SharePoint Specialist
if ( (Get-PSSnapin -Name “Microsoft.SharePoint.PowerShell” -ErrorAction SilentlyContinue) -eq $null ) {
Add-PSSnapin “Microsoft.SharePoint.PowerShell”
}
$spSite = Get-SPSite "http://sp"
$groups=("Group1","Group2")
foreach($spWeb in $spSite.AllWebs)
{
$spGroups = $spWeb.SiteGroups
foreach($group -In $spGroups -and $group -NotIn $groups)
{
$spGroups.Remove($group)
}
$spWeb.Dispose
}
$spSite.Dispose
Thank you very
much
Fahadullah Karimi
SharePoint Specialist
Page Layouts button was disabled for a publishing SharePoint page |