Skip to content

Latest commit

 

History

History
108 lines (75 loc) · 2.79 KB

File metadata and controls

108 lines (75 loc) · 2.79 KB
external help file Module Name online version applicable title schema author ms.author ms.reviewer
sharepointonline.xml
Microsoft.Online.SharePoint.PowerShell
SharePoint Online
Remove-SPOUser
2.0.0
trent-green
trgreen

Remove-SPOUser

SYNOPSIS

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

SYNTAX

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

DESCRIPTION

You must be a SharePoint Online administrator or Global Administrator and be 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 Intro to SharePoint Online Management Shell.

EXAMPLES

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

PARAMETERS

-Group

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

Type: String
Parameter Sets: (All)
Aliases:
Applicable: SharePoint Online

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoginName

Specifies the user name.

Type: String
Parameter Sets: (All)
Aliases:
Applicable: SharePoint Online

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site

Specifies the site collection to remove the user from.

Type: SpoSitePipeBind
Parameter Sets: (All)
Aliases:
Applicable: SharePoint Online

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

RELATED LINKS

Getting started with SharePoint Online Management Shell

Get-SPOUser