param($BriefingID) $sig = '[DllImport("user32.dll")] public static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow);' Add-Type -MemberDefinition $sig -name NativeMethods -namespace Win32 # Here is where the main code starts # $BriefingID = "72023" $DocumentsFilePath = "\\myebcweb1@8095\ebc_briefing\$BriefingID" $DocumentsHttpPath = "http://myebc:8095/ebc_briefing/$BriefingID" Write-Host "Launching Explorer with your file $DocumentsHttpPath" start-process explorer.exe -ArgumentList $DocumentsHttpPath -WindowStyle Maximized start-sleep 1 $hwnd = @(Get-Process "Explorer")[0].MainWindowHandle # Restore window [Win32.NativeMethods]::ShowWindowAsync($hwnd, 4)