instantiate chrome object in powershell

user2874251 picture user2874251 · Oct 14, 2013 · Viewed 64.7k times · Source

I have a powershell script which works just fine in IE however I need to also have it work in Chrome. $ie = new-object -com "InternetExplorer.Application" Works fine for IE. How do I instantiate the Chrome browser?

Answer

Jim picture Jim · Oct 14, 2013

You can start a process by name and even pass it a parameter, like this:

Start-Process "chrome.exe" "www.google.com"