There may be occasions when you need to connect to the Security and Compliance Centre in Office 365. Maybe to administrate DLP Policies.
This can be done by opening an elevated PowerShell session and running the commands below:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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 | |
# When Complete | |
Remove-PSSession $Session |