Restart Exchange Service on Multiple Server using Powershell Command


Restart Exchange Service on Multiple Server using Powershell Command

Microsoft Exchange Services can be restarted using services.msc graphical console. But using powershell command it makes the job easier.

To check list of service use the following powershell command
Get-Service -ComputerName <ServerName> | Sort-Object Status

To restart Netlogon service on single computer
Get-Service -ComputerName <ServerName> -Name Netlogon | Restart-Service

To Stop MSExchangeUM service for group of computer. Create computer.txt file on list the servers name on it and save in C drive as computer.txt file

Server1
Server2
Server3

Then run the following command based upon your requirement
Get-Content C:\Computer.txt | ForEach-Object { stop-Service -InputObject $(Get-Service -Computer $_ -Name MSExchangeUM ) }

To Start MSExchangeUMCR service for group of computer
Get-Content C:\Computer.txt | ForEach-Object { start-Service -InputObject $(Get-Service -Computer $_ -Name MSExchangeUMCR ) }

To Restart the service which is equal to stop and start the service
Get-Content C:\Computer.txt | ForEach-Object { Restart-Service -InputObject $(Get-Service -Computer $_ -Name netlogon) }

Advertisements

About Raji Subramanian

Nothing great to say about me...Just want to share my knowledge for others that will be useful at any moment of time when they stuck in critical issue....
This entry was posted in Uncategorized and tagged , , , , , , , . Bookmark the permalink.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s