Disable Access to Exchange Online PowerShell

By default Exchange Online has PowerShell access enabled for all users. The level of access, for the users, is determined by the roles you are assigned in the organization but most security conscious organizations will want to button up and close down access to all users that don’t require it to be enabled.

I will detail a simple method to check access for one account and disable access to that account. For more detailed methods to disable for many accounts, please use this Microsoft KB.


Connect to Exchange Online with PowerShell

View the status of a single user

  1. Get-User <UserIdentity> | Format-Table Name,DisplayName,RemotePowerShellEnabled

View the status of all users

  1. Get-User -ResultSize unlimited | Format-Table Name,DisplayName,RemotePowerShellEnabled

Disable access to a single user

  1. Set-User <UserIdentity> -RemotePowerShellEnabled $false

Leave a Reply