Change Google Chrome homepage setting, but then scripted

In order to change the homepage of the Google Chrome browser, installed on a win7 pc, you can change the homepage, e.g. via login script. (see e.g. for chrome info)

Of course you can load adm files in your domain controller, but it can be done scripted.

powershell -command "(Get-Content 'C:\Users\%USERNAME%\AppData\Local\Google\Chrome\User Data\Default\Preferences') | ForEach-Object { $_ -replace 'some.url.tld', 'someother.url.tld' } | Set-Content 'C:\Users\%USERNAME%\AppData\Local\Google\Chrome\User Data\Default\Preferences'"

Hope this helps you.

Edit: For your info, the above command changes all occurances of ‘some.url.tld’, beware that any other setting with this value will also be adjusted. cheers.

This entry was posted in Chrome, Homepage. Bookmark the permalink.