Stop and disable All Exchange 2013 Services with a Single Command

Don’t get involved with Exchange too much but thought this was a cool command to use to stop all Exchange services in one (or maybe two) attempts.

The scenario was a test Exchange server with all services running on a single machine and needed to stop all services to perform a recovery operation.

Open PowerShell using Run as Administrator and then run this command.

  • get-service | ?{$_.Name -ilike “MSexch*”} | stop-service

If some services fail to stop because dependent services are running just run the command a second time straightaway.

To disable the services run this:

  • get-service | ?{$_.Name -ilike “MSexch*”} | set-service -StartupType Disabled