Reputation: 859
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; Start-Process -SomeCommandToOpenChromeHidden "chrome.exe" "www.google.com"
Any idea?
Thanks
RESOLVED: I updated my IE to 11 then now it is fine with following command:
$ie = new-object -comobject InternetExplorer.Application $ie.visible = $false
Upvotes: 2
Views: 6794
Reputation: 1102
There is -WindowStyle Parameter. Values can be: Normal, Hidden, Minimized, and Maximized. The default value is Normal.
So you need to use:
Start-Process -WindowStyle Hidden "chrome.exe" "www.google.com"
Upvotes: 1