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

 

About Idit Bnaya

Sr. Cloud Solution Architect at Microsoft, I’m passionate about helping customers succeed by building secure, scalable, and innovative cloud solutions – with a strong focus on AI, DevOps practices, and end-to-end security. With a proven track record in the IT and services industry, I serve as a trusted advisor, partnering closely with organizations to guide them through digital transformation and maximize the value of their cloud investments. My role combines technical leadership with project ownership – from designing modern architectures to leading cross-functional implementations that drive real business outcomes. I also manage and empower strategic partners, working hand-in-hand with them to ensure project success and deliver measurable business impact for customers.
This entry was posted in Office365. Bookmark the permalink.

Leave a Reply