Stop all Exchange Services

When migrating from Exchange 2007/2010 to Exchange 2013, one of the steps is to test the environment with the old server out of the mix. To do this, you can simply unplug the server (virtual or physical) from the network and see what happens. However, there are times when the server is not physically accessible to you and you need to perform this test anyway. With this script, you can stop all Exchange services and test your environment (mail flow, client connectivity, etc).

Purpose:	Script to stop all exchange services
Author:		Michael Kenning (
Version:	0.2 (beta) (9 JUN 2015)
Usage: 		./stopservice.ps1

$Services = Get-Service | where {$_.Name -like "MSExchange*"}

foreach ($service in $services) {
	if ($service.Status -eq "Running") {
		Stop-Service -InputObj $service
Tagged with: , ,
Posted in Powershell

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: