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
- Get-User <UserIdentity> | Format-Table Name,DisplayName,RemotePowerShellEnabled
View the status of all users
- Get-User -ResultSize unlimited | Format-Table Name,DisplayName,RemotePowerShellEnabled
Disable access to a single user
- Set-User <UserIdentity> -RemotePowerShellEnabled $false