Updating the PowerShell Kernel in Azure Data Studio

Azure Data Studio logo

In my previous post, I discussed an issue I encountered where comments caused strange issues in a PowerShell notebook in Azure Data Studio. I opened an issue in GitHub about this, and got some very prompt feedback from a member of the team.

It turns out I did not have the latest version of the PowerShell Kernel running on my machine. The latest version is currently 0.1.3, and I had 0.1.2. Upgrading appears to have solved this issue for me – yay!

This solution also raises the issue that there is no notification from Azure Data Studio that a PowerShell Kernel exists or is in need of updating. I (and probably others) will just believe that as long as Azure Data Studio is up to date, we're good to go. So how does one update their PowerShell kernel? Well, it's simple, but not intuitive. Here's how you do it:

Check Your Version

In a PowerShell Notebook, you'll notice an option in your toolbar for "Manage Packages". Click on it.

Screenshot showing "Manage Packages" button
(click to enlarge)

Here you'll get a list of all the installed packages. Scroll down and find "powershell-kernel":

Screenshot showing list of installed packages in Azure Data Studio

Here you can see the version is 0.1.2.

Upgrading

Is there a newer version available? To check if anything newer is out there, click on "Add New" at the top. In the search box, type "powershell-kernel". It does not appear to match on partial search terms, so you'll need to type that exactly. Click "Search", and the Package Version dropdown will populate with all the versions of this package.

Screenshot showing "add new" tab of package manager in Azure Data Studio

Select the latest version of the package, click "Install", and you'll be in business with the latest version of the PowerShell Kernel! Now if you run the PowerShell notebook from my previous post, you will see that everything works as expected!

They're Already Fixing This!

While this works and solves my issue, it certainly can be better. I'd love to see Azure Data Studio either automatically update, or give notifications about newer versions of packages like this. It looks like members of the Azure Data Studio team also feel the same way, as they've already created an issue for this!

Moral of the story?

I guess this just goes to show that if you are observing strange behavior, don't be shy about reporting it. You might just have found an issue that can be fixed and help everyone!