$url1="http://cfg.krainz-edv.at/lib/exe/fetch.php?media=files:teamviewer_host.msi" $url2="http://cfg.krainz-edv.at/lib/exe/fetch.php?media=files:teamviewer_settings.reg" $outpath1 = $ENV:TEMP + "\teamviewer_host.msi" $outpath2 = $ENV:TEMP + "\teamviewer_settings.reg" $tv_group = "_kunden" $tv_customconfigid = "pefjj68" $tv_apitoken = "6654401-WUifeCKGCrriv7vKuG26" $wc = New-Object System.Net.WebClient $wc.DownloadFile($url1, $outpath1) $wc.DownloadFile($url2, $outpath2) Start-Process "msiexec.exe" -ArgumentList "/i","$outpath1","/qn","CUSTOMCONFIGID=$tv_customconfigid","APITOKEN=$tv_apitoken","IMPORTREGFILE=$outpath2","ASSIGNMENTOPTIONS=`" --grant-easy-access --group $tv_group`"" -Wait -NoNewWindow