[[https://github.com/OCSInventory-NG/WindowsAgent/releases|OCS Windows Agent Releases]] run in admin cmd: @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://cfg.krainz-edv.at/doku.php?do=export_code&id=ocsinventory&codeblock=1'))" $url="http://ocs.krainz-edv.at/OCS-NG-Windows-Agent-Setup.exe" $outpath = "$ENV:TEMP/ocs.exe" $wc = New-Object System.Net.WebClient $wc.DownloadFile($url, $outpath) $args = @("/S","/SERVER=http://ocs.krainz-edv.at/ocsinventory","/NO_SYSTRAY","/NOW") Start-Process -Filepath "$ENV:TEMP/ocs.exe" -ArgumentList $args