Upgrade Powershell Version [extra Quality] -
winget install --id Microsoft.PowerShell -e
$PSVersionTable.PSVersion
After installation, close and reopen PowerShell. Run: upgrade powershell version
If you're using PowerShell on Linux or macOS, you can upgrade via package managers. winget install --id Microsoft