The Remove-MgUserManager cmdlet in PowerShell removes a user’s manager.
To use the Remove-MgUserManager cmdlet, you must first connect to your Microsoft 365 tenant using the Connect-MGraph
cmdlet. Once you are connected, you can use the Remove-MgUserManager command.
Connect-MgGraph -Scopes 'User.Read.All'
The syntax to remove a user’s manager is given below.
Remove-MgUserManager
-UserId <String>
-InputObject <IUsersIdentity>
[-IfMatch <String>]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
In this article, we will discuss how to use the Remove-MgUserManager cmdlet in PowerShell to remove a user’s manager.
How to Remove a User’s Manager
To remove a user’s manager, run the following command.
Remove-MgUserManager -UserId '1f149c47-a670-4f12-a4ac-01423cbafb58'
The Remove-MgUserManager command uses the -UserId
parameter to specify the user and deletes a user’s manager.
Conclusion
Conclusion
I hope the above article on how to use the Remove-MgUserManager cmdlet in PowerShell to remove a user’s manager is helpful to you.
You can find more topics about PowerShell Active Directory commands and PowerShell basics on the ShellGeek home page.