Office 365 PowerShell Basics

To connect to Office 365 you need to download and install “Microsoft Online Services Sign-in Assistant” and to know how to do it. There are some tips.

Prerequisite software

Powershell 3.0 here: http://www.microsoft.com/en-us/download/details.aspx?id=34595

Microsoft Online Services Sign-in Assistant:

32 bit – http://go.microsoft.com/fwlink/p/?linkid=236299

64 bit – http://go.microsoft.com/fwlink/p/?linkid=236300

Office 365 Cmdlets

32 bit – http://go.microsoft.com/fwlink/p/?linkid=236298

64 bit – http://go.microsoft.com/fwlink/p/?linkid=236297

To Connect
You can connect to Office 365 tenant through PowerShell using following cmdlets:

Import-Module MSOnline
$cred=Get-Credential
Connect-MsolService -Credential $cred
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $cred -Authentication Basic -AllowRedirection
Import-PSSession $Session
...
Remove-PSSession $Session

Leave a Comment

Your email address will not be published. Required fields are marked *