728x90

서비스 재시작

#Get List of Microsoft Exchange Services

$services = Get-Service | ? { $_.name -like "MSExchange*" -and $_.Status -eq "Running"}

 

#Restart each service

foreach ($service in $services)

{

Restart-Service $service.name -Force

} 





중지 된 서비스 시작

#Get List of Microsoft Exchange Services

$services = Get-Service | ? { $_.name -like "MSExchange*" -and $_.Status -eq "Stopped"}

 

#Restart each service

foreach ($service in $services)

{

Restart-Service $service.name -Force

} 


728x90

+ Recent posts