Quantcast
Channel: Josh Mueller's Blog » PowerShell
Viewing all articles
Browse latest Browse all 4

PowerShell – Check if “SMS Agent Host” is Running and Start if Not

$
0
0
# PowerShell script# Josh Mueller – 2010# Script to check whether the "SMS Agent Host" is running# The script will start the service if it is not running cls $sName = "SMS Agent Host"$service = get-service -display $sName -ErrorAction SilentlyContinue$startService = Start-Service $sname if ($service.Status -eq "Running") { $sName + " is Running" }else {$startService} Filed […]

Viewing all articles
Browse latest Browse all 4

Latest Images





Latest Images