Skip to content

Instantly share code, notes, and snippets.

@dkopec91
Last active February 9, 2023 11:32
Show Gist options
  • Save dkopec91/9588e1839e961610c2120a0defe38d39 to your computer and use it in GitHub Desktop.
Save dkopec91/9588e1839e961610c2120a0defe38d39 to your computer and use it in GitHub Desktop.
PowerShell script for starting up multiple clean Chrome instances
#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