hello,
i try to send data with a powershell command, when i use this comand that work : C:\zabbix\bin\zabbix_sender.exe -vv -z X.X.X.X -p 10051 -s 'server_name' -k test -o 3930
info from server: "processed: 1; failed: 0; total: 1; seconds spent: 0.000033"
but when i use this script, that not work :
i try to send data with a powershell command, when i use this comand that work : C:\zabbix\bin\zabbix_sender.exe -vv -z X.X.X.X -p 10051 -s 'server_name' -k test -o 3930
info from server: "processed: 1; failed: 0; total: 1; seconds spent: 0.000033"
but when i use this script, that not work :
$count = (Get-ChildItem -Path C:\ -recurse -include *.txt).count
$hostname = hostname
$test = "C:\zabbix\bin\zabbix_sender.exe -vv -z X.X.X.X -p 10051 -s '$hostname' -k test -o $count"
info from server: "processed: 0; failed: 1; total: 1; seconds spent: 0.000016" sent: 1; skipped: 0; total: 1
C:\zabbix_SGCIO\zabbix\bin\zabbix_sender.exe -vv -z X.X.X.X -p 10051 -s '$hostname' -k test -o $count
but not work, do you have some idea, thanks$hostname = hostname
$test = "C:\zabbix\bin\zabbix_sender.exe -vv -z X.X.X.X -p 10051 -s '$hostname' -k test -o $count"
info from server: "processed: 0; failed: 1; total: 1; seconds spent: 0.000016" sent: 1; skipped: 0; total: 1
C:\zabbix_SGCIO\zabbix\bin\zabbix_sender.exe -vv -z X.X.X.X -p 10051 -s '$hostname' -k test -o $count
Comment