Great Serg
Great Serg

Reputation: 71

PowerShell, How can I open an url in existing browser tab?

I want to make a powershell script, that will:

  1. Run Chrome
  2. Open a google.com website
  3. Stay some time on it
  4. Go from google.com ===> bing.com in the same tab.

So this is the code, that works for me, it's run Chrome and open google.com website in the tab: Start-Process "chrome.exe" "www.google.com"

The main problem, I don't know how to open new link in the same tab. I found this article https://msdn.microsoft.com/en-us/library/aa768360(v=vs.85).aspx , but I am a total noobie and can't use this information properly. Is there someone, who could help me? Please?

Upvotes: 3

Views: 13748

Answers (1)

Deepesh
Deepesh

Reputation: 610

you Can use below powershell command to open URL in new tab in any Browser

Start-Process -FilePath Chrome -ArgumentList https://www.google.co.in

Where

Filepath - Browser type (Chrome , Explorer)

ArgumentList - URL

Upvotes: 7

Related Questions