Powershell, invoke-webrequest...and Zabbix -
i'm trying use powershell automate creation of reporting tool. need zabbix (v1.8) graph images. not yet possible through api must connect url , graphs. this code : $zabbixloginurl = "http://zabfront-eqx.noc.lan/zabbix/index.php?login=1" $zabbixgraphurl = "http://zabfront-eqx.noc.lan/zabbix/chart2.php?graphid=" $username = "username" $userpwd = "pwd" $loginpostdata = @{name=$username;password=$userpwd;enter="enter"} $login = invoke-webrequest -uri $zabbixloginurl -method post -body $loginpostdata -sessionvariable sessionzabbix #let's see if have cookie set if ($sessionzabbix.cookies.count -eq 0) { write-host "fail connect" break } else {write-host "connected"} #now let's retrieve graph #4433 using priviously established session $graph = invoke-webrequest -uri ($zabbixgraphurl+"4433") -websession $sessionzabbix i can connect , cookie : $sessionzabbix.cookies.getcookies(...