Microsoft Exchange Service 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
To restart Netlogon service on single computer
Get-Service -ComputerName
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) }
No comments:
Post a Comment