How to connect in PowerShell on Office 36513 November 2019
PowerShell Office 365 allows you to manage your Office 365 settings from the command line.
You must :
- Use PowerShell version 5.1 or later.
- Use a 64-bit version of Windows. Support for the 32-bit version of the Microsoft Azure Active Directory Module for Windows PowerShell ceased in October 2014.
Here’s how you can connect:
Open PowerShell is used the following script, for my part I prefer to use PowerShell ISE.
Connect-MsolService -Credential $Credential
$msoExchangeURL = “https://ps.outlook.com/powershell/”
$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri
$msoExchangeURL -Credential $Credential -Authentication Basic -AllowRedirection
Do not forget to log out via the following command at the end of the intervention: