Forum Discussion
U375700
May 02, 2025Copper Contributor
Assigning a Manager with PowerShell Graph – Manager Not Found
Hi everyone, We are currently refactoring our PowerShell scripts to align with Microsoft's recommended standards. In our script that creates new users in Azure Active Directory (AAD) via Microsoft ...
U375700
May 02, 2025Copper Contributor
Andres-Bohren
May 03, 2025Iron Contributor
Hi U375700
The Output shows that the command is unknown.
Have a look at this one: Set-MgUserManagerByRef
https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.users/set-mgusermanagerbyref?view=graph-powershell-1.0
Kind Regards
Andres
- U375700May 03, 2025Copper Contributor
Thanks for your feedback, unfortunately Microsoft's hints didn't work. The one that solved the problem for me was the script below:
Assign Managers for Microsoft 365 Users Using Graph PowerShell
To update or assign a manager for users in Microsoft 365, administrators can use the cmdlet
https://m365scripts.com/microsoft365/manage-microsoft-365-users-microsoft-graph-powershell/#Assign-managers-for-Microsoft-365-users-using-Graph-PowerShell
Thanks for the help.
Best regards.