How to Connect to Security & Compliance PowerShell Microsoft 365

Table of Contents

This article contains instructions for how to connect to Security & Compliance PowerShell using the EXO V2 module.

Security & Compliance using the same PowerShell module with Exchange Online. So, you need install Exchange Online PowerShell module.

Install Exchange Online PowerShell module

1. Right click on Windows icon then select Windows PowerShell Admin. In Windows 11, select Windows Terminal Admin instead of Windows PowerShell Admin.

How to Connect to Security & Compliance PowerShell Microsoft 365

2. Copy then paste all below commands into PowerShell window at once then hit Enter.

Note

You only need install Exchange Online module only once.

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine -Force;
Install-PackageProvider -Name NuGet -Force;
Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted;
Install-Module -Name ExchangeOnlineManagement;
Import-Module ExchangeOnlineManagement;

3. To connect to Security & Compliance PowerShell, run the following command:

Connect-IPPSSession

4. In the sign-in window that opens, let’s sign-in using a global admin account.

How to Connect to Security & Compliance PowerShell Microsoft 365

How do you know this worked

The Security & Compliance PowerShell cmdlets are imported into your local Windows PowerShell session and tracked by a progress bar. If you don’t receive any errors, you connected successfully. 

A quick test is to run a Security & Compliance PowerShell cmdlet, for example, Get-PSSession, and see the results.

Connect-PS C:\WINDOWS\system32> Get-PSSession

 Id Name            ComputerName    ComputerType    State         ConfigurationName     Availability
 -- ----            ------------    ------------    -----         -----------------     ------------
  1 ExchangeOnli... apc01b.ps.co... RemoteMachine   Opened        Microsoft.Exchange       Available

Leave a Comment

Required fields are marked *