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.
2. Copy then paste all below commands into PowerShell window at once then hit Enter.
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 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