title: powershell script to check if a process is running
body: <p>can somebody help me to create a powershell script to check a particular service is running in all the machines in active directory.</p>
  
  <p>for example process like ccsvchst is available in all systems. I got the code for how to check in a single machine. but need to get code for all machines in AD.</p>
  
  <pre><code>$ProcessName = "ccsvchst"
  if((get-process $ProcessName -ErrorAction SilentlyContinue) -eq $Null)
  { echo "Process is not running" }else{ echo "Process is running" }
  </code></pre>