Skip to content

Instantly share code, notes, and snippets.

@sblack4
Forked from dansmith65/Install-AWSCLIV2.ps1
Created May 10, 2024 16:00
Show Gist options
  • Save sblack4/196e4bb143ce68726d85b545b9c4886d to your computer and use it in GitHub Desktop.
Save sblack4/196e4bb143ce68726d85b545b9c4886d to your computer and use it in GitHub Desktop.
Install version 2 of AWS CLI via PowerShell
# https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
$dlurl = "https://awscli.amazonaws.com/AWSCLIV2.msi"
$installerPath = Join-Path $env:TEMP (Split-Path $dlurl -Leaf)
$ProgressPreference = 'SilentlyContinue'
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest $dlurl -OutFile $installerPath
Start-Process -FilePath msiexec -Args "/i $installerPath /passive" -Verb RunAs -Wait
Remove-Item $installerPath
$env:Path += ";C:\Program Files\Amazon\AWSCLIV2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment