Services starting/stoping and startup type change with PowerShell

To Get all the MxExchange Services Startup Type to  Automatic State

Get-Service | where{$_.Name –Like ‘MSExchange*’} | set-Service –StartupType ‘Automatic’

Start all msExchange services

Get-Service | where{$_.Name –Like ‘MSExchange*’} | start-Service

 

Stop all msExchange services

Get-Service | where{$_.Name –Like ‘MSExchange*’} | stop-Service –Force

Advertisements