Chrome installation on EC2 Windows via Powershell.
Security prevents installing Chrome, here is the magical power-shell command
A quick tip, that saved my time.
I normally use Linux on EC2, today I had to install a Windows EC2 the first time, as I was required to review my Machine Learning pipeline design & the related datasets (GDPR requirement).
I this quick blog I will share a quick way to install Chrome via Power-shell.
Initially, when I tried to install Chrome, I got multiple security errors
I used the following command in Powershell and it magically installed the chrome and created a short-cut.
$Installer = “chrome_installer.exe”
Invoke-WebRequest “http://dl.google.com/chrome/install/375.126/chrome_installer.exe" -OutFile $Path\$Installer
Start-Process -FilePath $Path\$Installer -Args “/silent /install” -Verb RunAs -Wait
Remove-Item $Path\$Installer$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)
The chrome shortcut appeared on my desktop.
Thank you for reading.