Export (0) Print
Expand All

Remove-SPOUser

 

Applies to: SharePoint Online, Office 365

Topic Last Modified: 2013-12-18

Removes a user or a security group from a site collection or a group.

Remove-SPOUser [-Site] <SpoSitePipeBind> [-LoginName] <String> [[-Group] <String>]

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.

 

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.

--------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.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft