May 2022
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Below you can find the PowerShell commands required to connect to Security & Compliance.

Run Powershell as Administrator and run each one separately.

Set-ExecutionPolicy RemoteSigned
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.compliance.protection.outlook.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session -DisableNameChecking

When you’ve finished run the below PS command to close the session.

Remove-PSSession $Session