I'm trying to launch Chrome in PowerShell with a specific user profile (--profile-directory parameter), but it creates a new profile instead.
I've tried:
& "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --profile-directory=Foobar
& "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe --profile-directory=Foobar"
& "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe --profile-directory='Foobar'"
Start-Process "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --profile-directory=Foobar
Start-Process "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe --profile-directory=Foobar"
etc....
Maybe you have spaces in your path name. Try this:
Start-Process "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" '--profile-directory="Foo Bar"'
Or this:
& "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" '--profile-directory="Foo Bar"'
Update: Please note that you cannot just use any path, but simple names like "Foo" or "Foo Bar", denoting subdirectories of c:\Users\%USERNAME%\AppData\Local\Google\Chrome\User Data, e.g. c:\Users\%USERNAME%\AppData\Local\Google\Chrome\User Data\Foo Bar. The directory names can be slightly different depending on your OS and OS version. If they are the same on Win7 and Win10, I have no idea. My current machine is a Win10 PC.
This works for a new profile from powershell
start-process Chrome "http://localhost:9876/debug.html",'--profile-directory="Profile 4"'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With