Remove-SPOUserProfile
从租户中删除用户配置文件。
语法
Default (默认值)
Remove-SPOUserProfile
-LoginName <String>
[-UserId <String>]
[<CommonParameters>]
说明
可用于从租户中删除 SharePoint 用户配置文件。
注意
必须先从 Microsoft Entra ID中删除用户,然后才能删除用户配置文件。 可以使用 Microsoft Entra cmdlet Remove-AzureADUser 执行此作
示例
示例 1
Remove-SPOUserProfile -LoginName joe.healy@contoso.com
示例 1 从特定租户的 SharePoint Online 用户配置文件中删除具有电子邮件地址 joe.healy@contoso.com 的用户。
参数
-LoginName
适用:SharePoint Online
指定要删除的用户配置文件的登录名。
参数属性
| 类型: | System.String |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-UserId
适用:SharePoint Online
指定要删除的用户配置文件的 ID。
参数属性
| 类型: | System.String |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。