Set-EntraUserManager

更新用户的经理。

语法

Default (默认值)

Set-EntraUserManager

    -UserId <String>
    -ManagerId <String>
    [<CommonParameters>]

说明

该 cmdlet 更新 Set-EntraUserManager Microsoft Entra ID 中的用户的管理器。 UserId指定要在Microsoft Entra ID中更新用户的管理器和ManagerId参数。

示例

示例 1:更新用户的经理

Connect-Entra -Scopes 'User.ReadWrite.All'
Set-EntraUserManager -UserId 'SawyerM@contoso.com' -ManagerId 'Manager@contoso.com'

此示例演示如何更新指定用户的管理器。

参数

-ManagerId

指定要作为所有者/管理器/成员分配的Microsoft Entra ID对象的 ID。

参数属性

类型:System.String
默认值:None
支持通配符:False
不显示:False
别名:RefObjectId

参数集

(All)
Position:Named
必需:True
来自管道的值:True
来自管道的值(按属性名称):True
来自剩余参数的值:False

-UserId

在Microsoft Entra ID中指定用户的 ID(作为用户主体名称或 ObjectId)。

参数属性

类型:System.String
默认值:None
支持通配符:False
不显示:False
别名:对象标识符 (ObjectId), UPN, Identity, UserPrincipalName

参数集

(All)
Position:Named
必需:True
来自管道的值:True
来自管道的值(按属性名称):True
来自剩余参数的值:False

CommonParameters

此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters