Skip to content

Instantly share code, notes, and snippets.

@techthoughts2
Created October 3, 2020 04:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save techthoughts2/0f0c62dad8e0fcee0bc17ba1380b5cee to your computer and use it in GitHub Desktop.
Save techthoughts2/0f0c62dad8e0fcee0bc17ba1380b5cee to your computer and use it in GitHub Desktop.
- dotnet tool install --global PowerShell --version 7.0.3
- powershell -command '.\configure_aws_credential.ps1'
# - aws s3 cp s3://ps-invoke-modules/PowerShell-7.0.3-win-x64.msi PowerShell-7.0.3-win-x64.msi --quiet
- powershell -command '[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;$url = """https://github.com/PowerShell/PowerShell/releases/download/v7.0.3/PowerShell-7.0.3-win-x64.msi""";$output = """$env:CODEBUILD_SRC_DIR\PowerShell-7.0.3-win-x64.msi""";Invoke-WebRequest -Uri $url -OutFile $output -ErrorAction Stop;if (-not(Test-Path $output)) {throw """PSCore failed to DL"""}'
- powershell -command "Start-Process $env:CODEBUILD_SRC_DIR\PowerShell-7.0.3-win-x64.msi -ArgumentList '/qn /norestart' -Wait"
- '& "C:\Program Files\PowerShell\7\pwsh.exe" -command ''.\install_modules.ps1'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment