The Office 365 Compliance Center is the management interface for the compliance-related features of Office 365 such as eDiscovery and Mobile Device Management.
To manage the Compliance Center with PowerShell we need to make a remote PowerShell session. If you’ve been managing Office 365 until now you are probably already aware of how to make a remote PowerShell session to Exchange Online.
- Capture Office 365 admin credentials
- Create a new PSSession
- Import the PSSession
As with the Exchange Online remote session the easiest way to establish a remote session to the Compliance Center is by adding a function to your PowerShell profile that you can run each time you need to connect. You can read more about setting up a PowerShell profile here.
You can download the Connect-ComplianceCenter function from Github.
Example usage:
Windows PowerShell Copyright (C) 2014 Microsoft Corporation. All rights reserved. PS C:\Scripts> Connect-ComplianceCenter
A dialog will pop up and ask you for your Office 365 admin credentials.
WARNING: Your connection has been redirected to the following URI: "https://emea01b.ps.compliance.protection.outlook.com/powershell-liveid?PSVersion=4.0 " ModuleType Version Name ExportedCommands ---------- ------- ---- ---------------- Script 1.0 tmp_ya3sc4o3.v4b {Add-eDiscoveryCaseAdmin, Add-RoleGroupMember, Get-AdminAu...
After successfully connecting you’ll be able to run compliance-related cmdlets such as Get-DeviceComplianceSummaryReport.
This article PowerShell Function to Connect to the Office 365 Compliance Center is © 2015 ExchangeServerPro.com
Get more Exchange Server tips at ExchangeServerPro.com