Rui Qiu's Tech Blog
← Back to all posts

February 17, 2017

SCCM Compliance Rule for Finding Process Running

Here is my powershell script for finding if a  process is running with SCCM compliance rule.

$process = Get-Process Process-name-xxx -ErrorAction SilentlyContinue if ($process) { Write-Host “Running” } else {Write-Host “Not Running”}

  And for compliance rule is to check if the value is equal to  “Running”