当前位置:网站首页 > 更多 > 玩电脑 > 正文

[玩转系统] Set-MsolUserPrincipalName - 更改 Office 365 中的 UserPrincipalName

作者:精品下载站 日期:2024-12-14 06:27:59 浏览:13 分类:玩电脑

Set-MsolUserPrincipalName - 更改 Office 365 中的 UserPrincipalName


PowerShell 中的 Set-MsolUserPrincipalName cmdlet 会更改 Microsoft Office 365 中用户的主体名称或用户 ID。此命令可用于在联合域和标准域之间移动用户,这会导致身份验证类型更改为目标域的名称。

下面给出了在 Azure Active Directory 中更改用户主体名称的语法。

Set-MsolUserPrincipalName
   -ObjectId <Guid>
   -NewUserPrincipalName <String>
   -UserPrincipalName <String>
   [-ImmutableId <String>]
   [-NewPassword <String>]
   [-TenantId <Guid>]
   [<CommonParameters>]

在本文中,我们将讨论如何在 PowerShell 中使用 Set-MsolUserPrincipalName cmdlet 重命名 Office 365 中的用户。

如何在 Office 365 中重命名用户

要重命名 Office 365 中的用户,请使用带有 -NewUserPrincipalName 参数的 Set-MsolUserPrincipalName cmdlet。

-NewUserPrincipalName 参数指定用户的新用户 ID。

 Set-MsolUserPrincipalName -UserPrincipalName "[email " -NewUserPrincipalName "[email "

此命令将用户主体名称“[email ”重命名为“[email ”。

结论

希望上述有关如何在 PowerShell 中使用 Set-MsolUserPrincipalName cmdlet 重命名 Office 365 中的用户的文章对您有所帮助。

您可以在 ShellGeek 主页上找到有关 PowerShell Active Directory 命令和 PowerShell 基础知识的更多主题。

相关链接

设置 MsolUserLicense

设置 MsolUserPassword

您需要 登录账户 后才能发表评论

取消回复欢迎 发表评论:

关灯