Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $ie = new-object -com "InternetExplorer.Application"
  2. $ie.Visible = $true
  3.  
  4. $win = Add-Type -Name win -MemberDefinition @'
  5. [DllImport("user32.dll")]
  6. [return: MarshalAs(UnmanagedType.Bool)]
  7. public static extern bool SetForegroundWindow(IntPtr hWnd);
  8. '@ -Passthru
  9.  
  10. $win::SetForegroundWindow($ie.HWND)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement