Open a new browser

Welcome Forums General PowerShell Q&A Open a new browser

This topic contains 3 replies, has 2 voices, and was last updated by

 
Participant
2 years, 1 month ago.

  • Author
    Posts
  • #56474

    Participant
    Points: 0
    Rank: Member

    Hello,

    I want to write a PowerShell script to open a new browser window? I can open new pages but if a browser is open it just adds a new tab. I need a new window.

    For the default browser, I using:

    start http://www.cnn.com

    and for non default browser I am using:

    Start-Process -FilePath Chrome -ArgumentList www.cnn.com, www.bbc.com

    But again, if there is a window open they just open in tabs.

    thank you

  • #56476

    Participant
    Points: 263
    Helping Hand
    Rank: Contributor

    That's actually not a Powershell question 😉

    Chrome Open New Window Command Line

    Firefox New Window Command Line

    • #56479

      Participant
      Points: 0
      Rank: Member

      Sorry. To clarify. How do I do it in a PowerShell script?

    • #56486

      Participant
      Points: 263
      Helping Hand
      Rank: Contributor

      hmmmm ... obviously you already know how to start a process in Powershell with options. You showed this in the second code snippet in your initial post. Now you have to manage the challenge to ad a further switch to your argument list. Sometimes it's helpfull just to play a little bit around and see what's happening.

      Try this:

      Start-Process -FilePath Chrome -ArgumentList '--new-window www.cnn.com, www.bbc.com'

The topic ‘Open a new browser’ is closed to new replies.