Skip to main content

Posts

Showing posts from January, 2012

Remove user from Sharepoint group using powershell

PS C:\Users\ADM> $spWeb = Get-SPWeb http://abc/
PS C:\Users\ADM> $group=$spWeb.SiteGroups["Legal Approvers"]
PS C:\Users\ADM> $group.Users
PS C:\Users\ADM> $theuser = $spWeb.AllUsers.Item("SHAREPOINT\system")
PS C:\Users\ADM> $group.RemoveUser($theuser)
PS C:\Users\ADM> $group.Update()
PS C:\Users\ADM> $group.Users