Among the first things we usually want to do right after we’ve installed a brand-new Windows Server is to also install Google Chrome. Doing that won’t always be easy, though, because Internet Explorer Enhanced Security – which is activated by default in Windows Server – won’t allow to download the required setup package.
In order to fix this you have two options: either disable the Enhanced Security entirely by following these steps or execute the following Powershell Script, which will install Google Chrome in a matter of seconds:
1 | $LocalTempDir = $env:TEMP; $ChromeInstaller = "ChromeInstaller.exe"; (new-object System.Net.WebClient).DownloadFile('http://dl.google.com/chrome/install/375.126/chrome_installer.exe', "$LocalTempDir\$ChromeInstaller"); & "$LocalTempDir\$ChromeInstaller" /silent /install; $Process2Monitor = "ChromeInstaller"; Do { $ProcessesFound = Get-Process | ?{$Process2Monitor -contains $_.Name} | Select-Object -ExpandProperty Name; If ($ProcessesFound) { "Still running: $($ProcessesFound -join ', ')" | Write-Host; Start-Sleep -Seconds 2 } else { rm "$LocalTempDir\$ChromeInstaller" -ErrorAction SilentlyContinue -Verbose } } Until (!$ProcessesFound) |
Although this isn’t an one-liner technically, it can be used as one: just copy it, paste it into a Powershell prompt and you’ll be good to go. Needless to say, you’ll need to have an internet connection available, otherwise it won’t work.
No comments:
Post a Comment