Yeah, since it's a custom exe notification which doesn't rely on users or groups as it's always simply executed. When you execute it using PowerShell, you could do something like this:
param(
[string[]]$numbers,
[string]$sitename,
[string]$device,
[string]$name,
[string]$status,
[string]$message
)
$Date = (Get-Date -Format "ddMMyyyy-HHmmss")
$sms_content = ([string]::Format("[{0}] {1} {2} {3} {4}",
$sitename, $device, $name, $status, $message
Foreach($number in $numbers)
{ $sms_content | Out-File -Path "c:\mwconn\sms_send\$($Date)_$($number)"; }
Call this with the following parameters instead of the default batch file (save it as mwconn.ps1):
-Numbers @(1555123456,12212212,1212121) -SiteName '%sitename' -Device '%device' -Name '%name' -Status '%status' -Message '%message)'
It will create text files for every given number in the $numbers parameter and mwconn will read the single text files.
Note Remember to execute Set-ExecutionPolicy RemoteSigned in an administrative PowerShell on the PRTG Core Server. Otherwise, the script will not work properly. Also make sure to have the latest PowerShell, at least v4.0, installed.
Add comment