Advertisement
stephanlinke

Untitled

Dec 9th, 2016
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. param(
  2.     $prtghost,
  3.     $device,
  4.     $sensor,
  5.     $status,
  6.     $downsince
  7. )
  8.    
  9. $ps = new-object System.Diagnostics.Process
  10. $ps.StartInfo.Filename = "C:\Program Files (x86)\PRTG Network Monitor\Notifications\exe\PRTG_SendAlertToHP.exe"
  11. $ps.StartInfo.Arguments = [string]::Format("{0} {1} {2} {3} {4}", $prtghost, $device, $sensor,$status,$downsince);
  12. $ps.StartInfo.RedirectStandardOutput = $True
  13. $ps.StartInfo.UseShellExecute = $false
  14. $ps.start()
  15. $ps.WaitForExit()
  16. [string] $Out = $ps.StandardOutput.ReadToEnd();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement