hi everyone
I'm new in powershell and prtg.
I want to use the parameter %host for my powershell but I don't see how to use it ?
{{{param( [string]$host="defaulthost" )
$trace = Invoke-Command -ComputerName $host -ScriptBlock {
qfarm /load $host
}
$a=$trace[3] $b=$a.Substring(22) $c=$b.Trim() $d=[int]$c
Write-Host "<prtg>" Write-Host "<result>" Write-Host "<channel>Charge</channel>" Write-Host "<float>1</float>" Write-Host "<value>$d</value>" Write-Host "</result>" Write-Host "</prtg>"}}}
Add comment