powershell在隐藏的窗口中打开网址,除了IE [英] powershell open url in a hidden window except IE
问题描述
我想运行一个强大的shell命令像启动过程与浏览器,除了IE在一个隐藏的窗口中打开。是否有任何方法来设置浏览器的大小,使其在我们运行powershell命令时隐藏。
I would like to run a power shell command like Start-Process with browsers except IE to open in a hidden window. Is there any way to set size of browser to make it hidden when we run the powershell command.
Like;启动过程-SomeCommandToOpenChromeHiddenchrome.exewww.google.com
Like; Start-Process -SomeCommandToOpenChromeHidden "chrome.exe" "www.google.com"
任何想法?
感谢
RESOLVED:
我将我的IE更新为11,现在可以使用以下命令:
RESOLVED: I updated my IE to 11 then now it is fine with following command:
$ie = new-object -comobject InternetExplorer.Application $ie.visible = $false
推荐答案
有-WindowStyle参数。值可以是:正常,隐藏,最小化和最大化。默认值为Normal。
There is -WindowStyle Parameter. Values can be: Normal, Hidden, Minimized, and Maximized. The default value is Normal.
因此,您需要使用:
Start-Process -WindowStyle Hidden "chrome.exe" "www.google.com"
这篇关于powershell在隐藏的窗口中打开网址,除了IE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!