Forum Discussion

jtroxel71's avatar
jtroxel71
Copper Contributor
Oct 05, 2022
Solved

All User Locked out of Exchange Management Shell

To get around the recent security issue with remote access to Exchange Management Shell I ran the following command.     get-user -ResultSize unlimited | set-user -RemotePowerShellEnabled $false ...
  • jtroxel71's avatar
    Oct 05, 2022


    AndyDavid answered • 1 minute ago ACCEPTED ANSWER EXPERT ANSWERCOMMUNITY EXPERT
    Any and all Exchange Admin Accounts need to have that enabled. Your command disabled it for everyone.
    Can you reset it via the Exchange SNAP in?

    From the exchange server itself, open a generic powershell window then run:

    Add-PSSnapIn Microsoft.Exchange.Management.PowerShell.Admin

    From there run the commands to enable for the users that need it.

    set-user <user> -RemotePowerShellEnabled $true



    Thank you so much. This worked with a slight tweak. We did not have the admin version of the snap-in so the syntax changed a bit:


    get-pssnapin -registered

    Name : Microsoft.Exchange.Management.PowerShell.SnapIn
    PSVersion : 1.0
    Description : Admin Tasks for the Exchange Server

    We ran the command for this version

    Add-PSSnapIn Microsoft.Exchange.Management.PowerShell.Snapin

    set-user <user> -RemotePowerShellEnabled $true

    I was able to add our admin users and we once again gained the ability to use the EMC.