How to connect remote PowerShell to the office365’s cloud-based organization

1. Connect to  the cloud :

Connect to Office 365  :

Open Windows PowerShell.
Enter the credentials of an administrator account in the cloud-based organization using the following command –>

$LiveCred = Get-Credential
Create a connection to the cloud-based organization using the following command –>

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri                     https://outlook.office365.com/powershell-liveid/ -Credential $livecred -Authentication Basic -AllowRedirection

Load the Exchange cmdlets on the local computer using the following commands–>

Import-PSSession $Session
Disconnect from the session :

Remove-PSSession $Session

 

This entry was posted in Office365. Bookmark the permalink.

Leave a Reply