Created
June 16, 2022 06:18
-
-
Save rkttu/1ffe6aeb9208ac25750cb9816f514469 to your computer and use it in GitHub Desktop.
Meet Internet Explorer Again π
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add-Type 'public class SFW { [System.Runtime.InteropServices.DllImport("user32.dll")][return: System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.Bool)] public static extern System.Boolean SetForegroundWindow(System.IntPtr hWnd); }' | |
$handle = [activator]::CreateInstance([type]::GetTypeFromCLSID("0002DF01-0000-0000-C000-000000000046")) | |
$handle.Visible = $true | |
$handle.Navigate('http://www.example.com/') | |
[SFW]::SetForegroundWindow($handle.HWND) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you definitely want to part with IE...
https://docs.microsoft.com/en-us/deployedge/edge-ie-disable-ie11