Hello, Im trying to send variable to PowerShell scrip ussing key:
my script:
But if i test it like:
its not working.
User parameter:
Code:
usb.check["canon"]
Code:
param ($param1) $result = get-pnpdevice | Select-String -Pattern $param1 $res = $result | Select-String -Pattern $param1 Write-Host $res
Code:
usb.check["canon"]
User parameter:
Code:
UserParameter=usb.check[*],for /F "tokens=* usebackq" %a in (`""powershell -NoProfile -ExecutionPolicy Bypass -File "C:\zabbix\usb-check.ps1" $1"`) do @echo %a
Comment