Thursday, April 9, 2015

Delete SharePoint groups in Powershell

In this article ,We can create SharePoint group in any environment.


 But, we can see sometimes group name is not available but group name exists in SharePoint database. 

Powershell:


$spWeb = Get-SPWeb "http://peakfinders.blogspot.in/"$spGroups = $spWeb.SiteGroups$groups = ("Emp-Directory","Employee")ForEach($group in $groups) {
$spGroups.Remove($group);
}$spWeb.Dispose()

No comments:

Post a Comment