Skip to content

Instantly share code, notes, and snippets.

@aymenjaz
Created June 7, 2022 21:16
Show Gist options
  • Save aymenjaz/ee865c232382b69732ee0f87d58e5552 to your computer and use it in GitHub Desktop.
Save aymenjaz/ee865c232382b69732ee0f87d58e5552 to your computer and use it in GitHub Desktop.
Automatically Download and install Google Chrome. we need this script every time we install a new Windows server and we need to access internet , everyone know the error message that we have using internet explorer. this script is to remediate for this problem.
# Create a temporary directory to store Google Chrome.
mkdir -Path $env:temp\chromeinstall -erroraction SilentlyContinue | Out-Null
$Download = join-path $env:temp\chromeinstall chrome_installer.exe
# Download the Google Chrome installer.
Invoke-WebRequest 'http://dl.google.com/chrome/install/375.126/chrome_installer.exe' -OutFile $Download
# Install Google Chrome using Powershell.
Invoke-Expression "$Download /install"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment