document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. # Code Snippet from aperturescience.su
  2.  
  3. $services = Get-Service $query
  4. foreach ($svc in $services)
  5. {
  6.     if ($svc.status -ne "running")
  7.     {
  8.         try {
  9.             $svc.start()
  10.         } catch {
  11.        
  12.         }
  13.         send-email "One or more services were not running. $($svc.displayname)" $false
  14.     }
  15. }
  16.  
  17. # Code Snippet from aperturescience.su
');