In Office 365 you can do and automate a lot with Windows Powershell. Now this small post shows you how you can connect to Office 365 with Powershell.
- Install the Microsoft Online Services Sign-In Assistant
32-bit
64-bit - Install the Microsoft Online Services Module for Windows PowerShell
32-bit
64-bit - Open Powershell and import the MsOnline Module or use the desktop shortcut which was created by the installer.
Import-Module MsOnline
- Connect to your Microsoft Office 365 account
Connect-MsolService
Use your Office 365 LiveID to login (for example [email protected])
- Now you can start working with Windows Powershell in your Office 365 account, if you need some more help about the available Powershell cmdlets you can list them with
Get-Command -Module MsOnline
Fails. “In order to install Windows Azure Active Directory Module for Windows PowerShell, you must have Microsoft Online Services Sign-in Assistant version 7.0 or greater installed on this computer.” Yeah, I do. Rebooted. It’s all there. Microsoft isn’t.
Same here. Just use this link for the first download then reboot and come back to install the second plugin.
https://www.microsoft.com/en-us/download/confirmation.aspx?id=28177
Hey Thomas,
I found this page as a result of trying to amend adhocsubscription settings on my new GoDaddy account, so I can setup my Power BI login.
https://powerbi.microsoft.com/en-us/blog/ability-to-disable-free-sign-ups-for-the-free-power-bi/
It seems that this is deprecated and on a new module now?
I was enthusiastic when I found your page, but didn’t notice it was old.
Do you know if the above approach still applies or do I need to move onto the Azure Active Directory PowerShell for Graph module? I’ve tried this but am getting lost in PowerShell and Azure Portal.
Thanks
Scott
The new Module is the AzureAD module you can use, that is the new one :)
Install-Module AzureAD
Hi Thomas,
Many thanks for the super quick response.
I managed to do that earlier in the Windows PowerShell as an Administrator, but got stuck not knowing if its the right route.
All I then (apparently) needed to do in the MSONline module was:
Set-MsolCompanySettings -AllowAdHocSubscriptions $true
I’ve just done the following again in the Windows PowerShell and see loads of CmdLets, but cannot find any equivalent to the above AllowAsHocSubscriptions or *Company* or *Subscriptions*
Get-Command -Module AzureAD