How to connect with the Office 365 Exchange Online Windows PowerShell

|   23-Oct-18

With the Windows PowerShell command, you can control and manage the Exchange Online Mailbox by commands. For the remote session of Office 365 account, you can run the Windows PowerShell on your PC. It connects to the Exchange Online PowerShell within three easy steps. So follow the instructions for managing the o365 mailbox by the Windows PowerShell commands.

Connect the Office 365 Account with  Windows PowerShell

Step 1: First Open the Windows PowerShell on the local Computer.

Step 2: Once it launched you need to type the below command and hit on the Enter Key on the Keyboard.

$UserCredential = Get-Credential

Step 3: After that, put the Office 365 Mailbox ID and Password >> Ok.

Login Img

Step 4: Now configure with Microsoft Exchange by putting this given command.

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $UserCredential -Authentication Basic -AllowRedirection

Note: 1 Connection URL for 21Vianet Operator

2 For Garmany users

3 If you are working under the Proxy Server then put

$ProxyOptions = New-PSSessionOption -ProxyAccessType <Value>

The ProxyyAccessType Value is, IEConfig WinHttpConfig or AutoDetect

After that add the parameter and value at the end of $Session = … command:
-SessionOption $ProxyOptions

Step 5: Now create the PSSession to connect with Exchange Online PowerShell

Import-PSSession $Session –DisableNameChecking


Step6: At the end, you can remove the created PSSession by typing the following command.

Remove-PSSession $Session

Conclusion: In this blog, I explained to you that how to connect with the Office 365 Exchange Online Windows PowerShell. So follow the step by step process to connect the O365 Cloud with PowerShell. If you have still any doubt then leave write on the comment box. I will be happy to help you.

Featured Product