Focus IE window in powershell
问题 My code: $ie = new-object -com "InternetExplorer.Application" $ie.navigate("http://localhost") $ie.visible = $true $ie.fullscreen = $true However, after fullscreen, the window still appears behind the Windows taskbar. When I click the window to give it focus, the taskbar falls behind and it appears how I want it to. How can I do this programmatically? Thank you! 回答1: This was a toughy... Not as simple as I thought. I ended up using a cheat and adding the VB assembly: Add-Type -Assembly