READING TIME: 2 MINUTES
If you’re looking for a simple one-line Powershell script to open a webpage (or multiple webpages), then this tutorial will work perfectly for you.
I use this script to open several URL’s during our new hire deployment in a brand new Chrome browser window. For example, when a new employee starts, we typically have to create several accounts for the user – Duo 2FA, Screenconnect for remote access, KnowBe4 for end user training, etc. Instead of having to manually go to each URL, this script will automatically open all of the required URL’s our IT staff need to go to.
Not only does this “remind” the IT employee to create each account, it also opens it a new browser instead of just adding new tabs which could easily get lost in your sea of already open tabs.
Open Multiple URL’s in Chrome Powershell Script
Simply copy and paste this code into a new .ps1 file and change out the URL’s to fit your environment.
The last line of code will close the interactive Powershell window so it doesn’t stay open after the script completes.
Start-Process -FilePath Chrome -ArgumentList '--new-window https://admin.duosecurity.com https://training.knowbe4.com https://screenconnect.com https://snipe-it.io https://office.com' [Environment]::Exit(1)
Hopefully this simple script helps you launch a webpage from Powershell.
This post is a part of my Automating New Hires With Powershell series, where I create a bunch of helpful Powershell scripts to simplify the user onboarding process.
The end goal is to place all of these scripts into a simple GUI for your other IT members to quickly launch.
- How To Create Active Directory Users in Powershell & Copy Group of Existing Users
- How to Create a GUI for Powershell Scripts
- How To Input Passwords into PWpush.com Links from Powershell
- Powershell script to move computers to differnt OU or group
- How to Send Welcome Email to New Hires with Powershell
My Homelab Equipment
Here is some of the gear I use in my Homelab. I highly recommend each of them.
- Server 2019 w/ Hyper-V
- Case: Fractal Design Node 804
- Graphics Card: NVIDEA Quadro K600
- CPU: AMD Ryzen 7 2700
The full list of server components I use can be found on my Equipment List page.