$url1="http://cfg.krainz-edv.at/lib/exe/fetch.php?media=files:check_mk_agent.msi" $outpath1 = $ENV:TEMP + "\check_mk.msi" $wc = New-Object System.Net.WebClient $wc.DownloadFile($url1, $outpath1) Start-Process "msiexec.exe" -ArgumentList '/i','$outpath1','WIXUI_REMOVELEGACY="1"','/qn' -Wait -NoNewWindow New-NetFirewallRule -DisplayName "Check_MK Agent" -Direction Inbound -LocalPort 6556 -Protocol TCP -Action Allow Copy-Item 'C:\Program Files (x86)\checkmk\service\plugins\windows_updates.vbs' C:\ProgramData\checkmk\agent\plugins\