Updating PowerShell Core

Invoke-Expression "& { $(Invoke-RestMethod https://aka.ms/install-powershell.ps1) } -UseMSI"

or

iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"

To determine your current PowerShell version, run the following:

Get-Host | Select-Object Version

Thanks to Thomas Maurer and his blog post: https://www.thomasmaurer.ch/2019/07/how-to-install-and-update-powershell-7/