Office 365 PowerShell Basics

To connect to Office 365, you need to download and install the “Microsoft Online Services Sign‑in Assistant”, and you also need to know how to use it. Here are some tips.

The prerequisite software

PowerShell 3.0 is available from http://www.microsoft.com/en-us/download/details.aspx?id=34595

Microsoft Online Services Sign-in Assistant: 32 bit is available fromhttp://go.microsoft.com/fwlink/p/?linkid=236299

Microsoft Online Services Sign-in Assistant: 64 bit is available fromhttp://go.microsoft.com/fwlink/p/?linkid=236300

Office 365 cmdlets 32 bit is available from http://go.microsoft.com/fwlink/p/?linkid=236298

Office 365 cmdlets 64 bit is available from http://go.microsoft.com/fwlink/p/?linkid=236297

You can connect to your Office 365 tenant through PowerShell using the 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

Posted

in

by

Comments

Leave a Reply

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