Remove-SPOExternalUser
Removes a collection of external users from the tenancy's folder.
Syntax
Remove-SPOExternalUser
[-Confirm]
-UniqueIDs <String[]>
[-WhatIf]
[<CommonParameters>]
Description
The Remove-SPOExternalUser
cmdlet permanently removes a collection of external users from the tenancy's folder.
Users who are removed lose access to all tenant resources.
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-----------------------------
$user = Get-SPOExternalUser -Filter someone@example.com
Remove-SPOExternalUser -UniqueIDs @($user.UniqueId)
This example removes a specific external user who has the address "someone@example.com". Organization members may still see the external user name displayed in the Shared With dialog, but the external user will not be able to sign in and will not be able to access any tenant resources.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Online |
-UniqueIDs
Specifies an ID that can be used to identify an external user based on their Windows Live ID.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Online |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Online |