title: How to install AWS CLI through PowerShell script?
body: <p>I am trying to check if aws cli is installed already, and install it if not present, I can't find any source on how to install it through PowerShell script</p>
  <pre><code>function prereq {
      if ((Get-Command aws -ErrorAction SilentlyContinue) -eq $null) {
          Write-Host &quot;Unable to find aws.exe in your PATH.&quot;
      } else {
      # Download from this link https://awscli.amazonaws.com/AWSCLIV2.msi
      # Install the AWSCLIV2.msi 
      # print aws cli version &quot;aws --version&quot;
      }
  }
  
  prereq
  </code></pre>