Изменить

Поделиться через


Set-EntraUserManager

Updates a user's manager.

Syntax

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

Description

The Set-EntraUserManager cmdlet update the manager for a user in Microsoft Entra ID. Specify the UserId and ManagerId parameters to update the manager for a user in Microsoft Entra ID.

Examples

Example 1: Update a user's manager

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

This example demonstrates how to update the manager for the specified user.

Parameters

-ManagerId

Specifies the ID of the Microsoft Entra ID object to assign as owner/manager/member.

Type:System.String
Aliases:RefObjectId
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-UserId

Specifies the ID (as a User Principle Name or ObjectId) of a user in Microsoft Entra ID.

Type:System.String
Aliases:ObjectId
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False