Last active
February 9, 2023 11:32
-
-
Save dkopec91/9588e1839e961610c2120a0defe38d39 to your computer and use it in GitHub Desktop.
PowerShell script for starting up multiple clean Chrome instances
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Starts multiple Chrome browser instances with individual, instance-specific, data directories | |
$ChromePath = "C:\Program Files (x86)\Google\Chrome\Application" | |
$TempPath = "C:\ChromeTMP" | |
$Delay = 800 | |
$NumberOfInstances = 5 | |
$StartUrl = "duckduckgo.com" | |
cd $ChromePath | |
for ($i=0; $i -lt $NumberOfInstances; $i++ ) | |
{ | |
$Guid = [guid]::NewGuid().Guid; | |
$NewPath = $TempPath+"\"+$Guid | |
mkdir $NewPath | |
.\chrome.exe $StartUrl --start-maximized --user-data-dir=$NewPath | |
Start-Sleep -Milliseconds $Delay | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment