Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Remove-SPOUser

Remove-SPOUser

microsoft.online.sharepoint.powershell-1.dll, microsoft.online.sharepoint.powershell.dll

Synopsis

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

Syntax

Remove-SPOUser [-Site] [-LoginName] [-Group] [<CommonParameters>]

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 (http://go.microsoft.com/fwlink/?LinkID=187810).

You must be a SharePoint Online global administrator and a site collection administrator to run the Remove-SPOUser cmdlet.

For permissions and the most current information about Windows PowerShell for SharePoint Online, see the online documentation at http://go.microsoft.com/fwlink/p/?LinkId=251832 (http://go.microsoft.com/fwlink/p/?LinkId=251832).

Parameters

-Site <SpoSitePipeBind>

Specifies the site collection to remove the user from.

Aliases

None

Required?

True

Position

2

Default value

Accept pipeline input?

False

Accept wildcard characters?

False

-LoginName <String>

Specifies the user name.

Aliases

None

Required?

True

Position

3

Default value

Accept pipeline input?

False

Accept wildcard characters?

False

-Group <String>

Specifies the group to remove the user from. If not specified, the cmdlet removes the user from all groups.

Aliases

None

Required?

False

Position

4

Default value

Accept pipeline input?

False

Accept wildcard characters?

False

Input Type

Return Type

Notes

None

Examples

--------EXAMPLE--------

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.

C:\PS>Remove-SPOUser -Site https://contoso.sharepoint.com/sites/sc1 -LoginName joe.healy@contoso.com -Group "SC1 Owners"

Introduction to the SharePoint Online management shell
Set up the SharePoint Online Management Shell Windows PowerShell environment
Get-SPOUser