Remove-SPOUser
Published: July 16, 2012
Applies to: Office 365 | SharePoint Online
Removes a user or a security group from a site collection or a group.
Remove-SPOUser [-Site] <SpoSitePipeBind> [-LoginName] <String> [[-Group] <String>]
Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| Site | Required | Microsoft.Online.SharePoint.PowerShell.SpoSitePipeBind | Specifies the site collection to remove the user from. |
| LoginName | Required | System.String | Specifies the user name. |
| Group | Optional | System.String | Specifies the group to remove the user from. If not specified, the cmdlet removes the user from all groups. |
Detailed Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you may not combine parameters from different parameter sets. For more information about how to use parameter sets, see Cmdlet Parameter Sets.
You must be a SharePoint Online global administrator and a site collection administrator to run the Remove-SPOUser cmdlet.
Input Types
Return Types
--------EXAMPLE--------
Remove-SPOUser -Site https://contoso.sharepoint.com/sites/sc1 -LoginName joe.healy@contoso.com -Group "SC1 Owners"
This example removes a user who has the email address joe.healy@contoso.com from the group SC1 Owners in the site collection https://contoso.sharepoint.com/sites/sc1.
Change History
| Date | Description |
|---|---|
| July 16, 2012 | Initial publication |
