Check Service Status Parallelly across multiple servers using PowerShell

Hi All,

If you want to check the services across multiple remote servers , below script will be useful. It uses PowerShell work flow and works in multi-threaded way.

workflow parallelServiceCheck {






$obj =New-Object –TypeName PSObject


if (!([String]::IsNullOrEmpty($serviceName)))


$Services = Get-Service -Name $($serviceName) | where { $_.Status -eq $Status }




$Services = Get-Service| where { $_.Status -eq $Status }


Add-Member -InputObject $obj -MemberType NoteProperty -Name Services -Value $Services -Force

$obj| select servername, services|select -ExpandProperty services|select Name,Status



parallelServiceCheck -PSComputerName Server1,Server2 `

-Status ‘running’ ` # status is mandatory

-Servicename ” `

|select PSComputerName,Name,Status | Out-GridView




Leave a Reply

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

You are commenting using your 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

%d bloggers like this: