DEV Community

Jesse Houwing for Xebia Microsoft Services

Posted on • Originally published at jessehouwing.net on

1

Upgrade Hosted Agent / GitHub Runner PowerShell

Upgrade Hosted Agent / GitHub Runner PowerShell

I managed to upgrade PowerShell at the start of the run and the agent will happily use it after installation.

You need to do two simple things.

  1. Install the PowerShell Core Preview onto the agent.
  2. Make PowerShell Core Preview the default by prepending the PATH environment variable.

Once you know how, it's easy:

- run: |
    Invoke-Expression "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI -preview -quiet"
    "C:\Program Files\PowerShell\7-preview" >> $env:GITHUB_PATH
  name: Upgrade to latest preview of powershell 
  # https://github.com/PowerShell/PowerShell/issues/17404#issuecomment-1188348379
Enter fullscreen mode Exit fullscreen mode

The same trick would work on Azure Pipelines:

- pwsh: | 
    Invoke-Expression "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI -preview -quiet"
    write-host "##vso[task.prependpath]c:\Program Files\PowerShell\7-preview"
Enter fullscreen mode Exit fullscreen mode

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more →

Top comments (0)