The below script for Remove SharePoint User Group using PowerShell
1.Click "Start" button
2.Choose the "Microsoft SharePoint 2010 Products"
3.Click the "SharePoint 2010 Management Shell" [ run as Administrator ]
http://abcd:32033/sites/SampleSite/ =Site collection url
TestGroup =User Group Name
1.Click "Start" button
2.Choose the "Microsoft SharePoint 2010 Products"
3.Click the "SharePoint 2010 Management Shell" [ run as Administrator ]
Script:-
$spWeb = Get-SPWeb "http://abcd:32033/sites/SampleSite/"
$spGroups = $spWeb.SiteGroups
$groups = ("TestGroup")
ForEach($group in $groups) {
$spGroups.Remove($group)
}
$spWeb.Dispose()
$spGroups = $spWeb.SiteGroups
$groups = ("TestGroup")
ForEach($group in $groups) {
$spGroups.Remove($group)
}
$spWeb.Dispose()
Note:-
http://abcd:32033/sites/SampleSite/ =Site collection url
TestGroup =User Group Name
No comments:
Post a Comment