Share via


Exchange 2019: Disable Admin Access to the Exchange Admin Center (EAC) with PowerShell

Not only in Exchange 2019 but 2016 and 2013, you can remove access from the Exchange Admin Center so that Administrators cannot access it, some companies only allow PowerShell as they don't want the EAC exposed to the internet etc.

None the less, to disable it is very easy, to firstly check if the Admin option is enabled, we need to look at the properties of the ECP Virtual Directory, to do so you can run the following command:

  • Get-EcpVirtualDirectory | fl

http://everything-powershell.com/wp-content/uploads/2018/12/Admin1.png

As you can see, the option "AdminEnabled" is set to "True", to disable it you can run the following command:

  • Set-EcpVirtualDirectory -Identity "Exchange-2019\ecp (Default Web Site)" -AdminEnabled $False

http://everything-powershell.com/wp-content/uploads/2018/12/Admin2.png

The command takes a few minutes to run and warns you to restart IIS which you can simply do by running IISRESET from an elevated command prompt or simply rebooting the server. To check if the change occurred you can run the same command as in step 1 to view the properties again:

http://everything-powershell.com/wp-content/uploads/2018/12/Admin3.png

As you can see above, it is now set to False which means they cannot access the EAC.