Share via


Remove-SPOUserProfile

Remove user profile from the tenant.

Syntax

Default (Default)

Remove-SPOUserProfile
    -LoginName <String>
    [-UserId <String>]
    [<CommonParameters>]

Description

Can be used to remove the SharePoint user profile from the tenant.

Note

The User must be first be deleted from Microsoft Entra ID before the user profile can be deleted. You can use the Microsoft Entra cmdlet Remove-AzureADUser for this action

Examples

Example 1

Remove-SPOUserProfile -LoginName joe.healy@contoso.com

Example 1 removes a user who has the e-mail address joe.healy@contoso.com from the SharePoint Online User Profiles of the particular tenant.

Parameters

-LoginName

Applicable: SharePoint Online

Specifies the login name of the user profile to be deleted.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UserId

Applicable: SharePoint Online

Specifies the ID of the user profile to be deleted.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

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

Inputs

None

Outputs

System.Object