How to Open Multiple URLs in a Browser Using PowerShell

Table of Contents

Open multiple URLs using PowerShell

In some cases, you have several URLs, and you want to open them at once using PowerShell command or PowerShell scripts.

To achieve that goal, open Windows PowerShell then you enter the following commands or create a PowerShell script file and insert the following code:

Start-Process http://google.com
Start-Process https://yahoo.com
Start-Process  https://bing.com
How to Open Multiple URLs in a Browser Using PowerShell

Alternatively, you can create a PowerShell script (*.ps1) to open a single URLs or multiple URLs at once automatically.

How to Open Multiple URLs in a Browser Using PowerShell
How to Open Multiple URLs in a Browser Using PowerShell

Open sites with a specific browser using PowerShell

The above script will open sites with default browser in your computer. If you want to open the sites with a specific browser, let’s using the following commands:

Note

The Google Chrome must be installed in your computer before you run the batch file.

[system.Diagnostics.Process]::Start("chrome","https://google.com")
[system.Diagnostics.Process]::Start("chrome","https://yahoo.com")
[system.Diagnostics.Process]::Start("chrome","https://bing.com")
How to Open Multiple URLs in a Browser Using PowerShell

Open a URL in Microsoft Edge Using PowerShell

[system.Diagnostics.Process]::Start("msedge","https://google.com")

Open a URL in Mozilla Firefox Using PowerShell

[system.Diagnostics.Process]::Start("firefox","https://google.com")

Open a URL in Internet Explorer Using PowerShell

[system.Diagnostics.Process]::Start("iexplore","https://google.com")

Open sites with delay using PowerShell

In some cases, you want to add a delay of some seconds between each URL because they open all at once which freezes up the machine.

To do it, you need to add command into your script. In the below example, after the first one is opened, the script will wait for 10 seconds before starting the next one.

Start-Process http://google.com
Start-Sleep -Seconds 10
Start-Process https://yahoo.com
Start-Sleep -Seconds 10
Start-Process  https://bing.com

The output when you run the PowerShell script.

How to Open Multiple URLs in a Browser Using PowerShell

Leave a Comment

Required fields are marked *