In this post, I’ll try to archive everything you need to download and install to get commandlets like Connect-MsolService working. I’ve had to do it a couple of times when changing laptops, so it’s good to document them somewhere! 🙂
So, when would you need to follow this guide and install the modules described here? Mostly this comes to play, when you’re switching machines, try to run the SharePoint Online Management shell but it doesn’t even exist on the machine, or it does exist but you get random errors like this:
The term 'Connect-MsolService' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
This guide should help you out! I’ll try to keep it updated as things change.
- Microsoft Online Services Sign-In Assistant for IT Professionals RTW
- SharePoint Online Management Shell
- Windows Azure Active Directory Module for Windows PowerShell (v1)
- Update 5.3.2018: Microsoft actually moved this documentation, and apparently hid it behind authentication somewhere (might require Global Admin or similar on your tenant to even READ IT… That’s smart.)
- If you installed it before, it’ll still work, but if you didn’t, never mind. Just see this step.
Now, to run cmdlets like “Connect-MsolService”, just start SharePoint Online Management Shell (or PowerShell).
If you also need Azure Remote Management (AzureRM) cmdlets (I always do!), run this in an elevated PowerShell:
# Install the Azure Resource Manager modules from the PowerShell Gallery
What to do if Microsoft hid the AAD module for PowerShell?
Fear not – only the last step (step 3) changed! Instead of installing the AAD module, you run this on PowerShell: Continue reading