Office 365 - Powershell
Connecting to Office 365 via Powershell for the first time? Here are the steps to get started:
- Install the Microsoft Online Services Sign-In Assistant for IT Professionals RTW
- Install the Azure Active Directory Module for Windows Powershell (64-bit version)
- Open Powershell and run this command the first time you connect on your computer:
Set-ExecutionPolicy RemoteSigned
- Next, run these three commands (you'll do this everytime you want to connect):
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
- You should now be connected. When finished, run:
Remove-PSSession $Session
Update: Here is an awesome project on github that is a Office 365 Powershell GUI: https://github.com/bwya77/O365-Administration-Center
Microsoft References:
https://technet.microsoft.com/en-ca/library/jj151815.aspx#bkmk_installmodule
https://technet.microsoft.com/en-us/library/jj984289(v=exchg.160).aspx