- Open Powershell as administrator
- Run command – Set-ExecutionPolicy Remotesigned
- Type Y for yes
- Run command – $UserCredential = Get-Credential
- Sign in with O365 administrator account (user@company.com)
- Run command – $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUrl https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
- Run command – Import-PSSession $Session
- You are now connected to O365 Exchange Online
![](https://nmq52a.p3cdn1.secureserver.net/wp-content/uploads/2023/08/Powershell-1-1024x210.png)
![](https://nmq52a.p3cdn1.secureserver.net/wp-content/uploads/2023/08/Powershell-2-1024x179.png)