Wednesday 6 November 2013

Remove SharePoint User Groups using PowerShell in SharePoint 2010

Share it Please
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 ]


     
   Script:-

      $spWeb = Get-SPWeb "http://abcd:32033/sites/SampleSite/"
     $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

Followers

Follow The Author