Last active
April 23, 2020 01:13
-
-
Save TylerLeonhardt/aeda3dbf5b1854736fe8e1ada2e143dc to your computer and use it in GitHub Desktop.
Put this script in a `PowerShell` task in your Azure Pipelines YAML and the `PowerShell` task will use the daily build of PowerShell!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
steps: | |
- powershell: | | |
Write-Host "Installing PowerShell Daily..." | |
# Use `AGENT_TEMPDIRECTORY` to make sure the downloaded PowerShell is cleaned up. | |
$powerShellPath = Join-Path -Path $env:AGENT_TEMPDIRECTORY -ChildPath 'powershell' | |
Invoke-WebRequest -Uri https://aka.ms/install-powershell.ps1 -OutFile ./install-powershell.ps1 | |
./install-powershell.ps1 -Destination $powerShellPath -Daily | |
# Using `prependpath` to update the PATH just for this build. | |
Write-Host "##vso[task.prependpath]$powerShellPath" | |
displayName: Install PowerShell Daily | |
- pwsh: '$PSVersionTable' | |
displayName: Display PowerShell version information |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write-Host "Installing PowerShell Daily..." | |
# Use `AGENT_TEMPDIRECTORY` to make sure the downloaded PowerShell is cleaned up. | |
$powerShellPath = Join-Path -Path $env:AGENT_TEMPDIRECTORY -ChildPath 'powershell' | |
Invoke-WebRequest -Uri https://aka.ms/install-powershell.ps1 -OutFile ./install-powershell.ps1 | |
./install-powershell.ps1 -Destination $powerShellPath -Daily | |
# Using `prependpath` to update the PATH just for this build. | |
Write-Host "##vso[task.prependpath]$powerShellPath" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example PR can be found here:
PowerShell/PowerShellEditorServices#1252
and here:
PowerShell/vscode-powershell#2617