Link to home
Start Free TrialLog in
Avatar of jhyiesla
jhyieslaFlag for United States of America

asked on

PowerShell for Office 365 and Azure AD

Personally, I think that PowerShell should be called PowerSh**.

There's regular PS and then there's the Azure one and then there's the Exchange management shell that is sort of another PS and who knows, there may be more.

Geez...

So, I've worked my way thru this once before, but have now come up empty in remembering what I did.  I've spent about an hour or so perusing the Internet looking for the commands that have to go in front of the commands that I want to do.  And, of course there doesn't appear to be a single article that outlines exactly the commands. And even when I trace the supposed commands that go before the ones that I need, I usually end up with an error that the command I've just executed isn't a valid command.

So, here are the two commands that I want to ultimately execute:

Get-MSOLUser –UserPrincipalName <UPN of the affected user> | FL | Clip
Get-Mailbox –Identity “User Name” | FL | Clip

I'm trying to track down an issue between on -premise AD and Office 365.

Can you tell me which PS  or PS's I really want to run for these and what commands have to come first in order for these to be recognized?  I'm running these either on a Windows 2012 server or  Windows 10 PC.
ASKER CERTIFIED SOLUTION
Avatar of Jeremy Weisinger
Jeremy Weisinger

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jhyiesla

ASKER

Perfect, thanx... what it I want to run them against the Azure AD side, or is that even a thing?
Avatar of Jeremy Weisinger
Jeremy Weisinger

MSOL commands only apply to Azure AD. :)
Thanx...
Powershell is infinitely extensible by the use of modules.  If the modules are in your psmodulepath then since powershell 4 they will automatically import.  If you don't like using Powershell to manage things and don't like scripting you are always free to NOT use it and use the gui tools. Scripting gives you repeat-ability.
Glad to help. :)