Forum Discussion
How to get the manager with the get-user?
Hi,
I've added managers to a handful of employees with the command line for the purpose of testing
Set-User andy.kw -Manager Big.Boss
I can see the manager through the graphical interface of Office 365 but when using the get-user cmdlet, nothing is coming.
When looking at the doc, nothing is mentioned though.
Any ideas?
Cheers,
Andy
Yes, you should install Azure AD module for Powershell:
(please mark my reply as accepted response if it helped)
Get-User should also reflect on the changes though. It might be some delay replication, but that shouldn't take more than a couple of minutes.
- Pablo R. OrtizSteel Contributor
You should connect to Azure AD and run Get-AzureADUserManager
https://docs.microsoft.com/en-us/powershell/module/azuread/get-azureadusermanager?view=azureadps-2.0
And for adding manager to Office 365 users you can use Set-AzureADUserManager
- Andy KwBrass Contributor
Hi P.R,
Thanks for the quick reply.
The Set-AzureADUserManager is only available the azure ad, right?
Cheers,Andy
- Pablo R. OrtizSteel Contributor
Yes, you should install Azure AD module for Powershell:
(please mark my reply as accepted response if it helped)