title: PowerShell does not recognize AWS CLI installed in the same script
body: <p>I have installed aws cli using powershell script</p>
  <pre><code> $command = &quot;[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12&quot;
   Invoke-Expression $command
   Invoke-WebRequest -Uri &quot;https://awscli.amazonaws.com/AWSCLIV2.msi&quot; -Outfile C:\AWSCLIV2.msi
   $arguments = &quot;/i `&quot;C:\AWSCLIV2.msi`&quot; /quiet&quot;
   Start-Process msiexec.exe -ArgumentList $arguments -Wait
   aws --version
  </code></pre>
  <p>When I try to print the <code>aws --version</code> it gives the below error.</p>
  <pre><code>aws : The term 'aws' is not recognized as the name of a cmdlet, function, 
  script file, or operable program. Check the spelling of the name, or if a path 
  was included, verify that the path is correct and try again.
  At line:1 char:1
  + aws
  + ~~~
  </code></pre>