First, it is important to distinguish between the version pre-installed on Windows () and the modern, cross-platform version ( PowerShell 7+ ).
Updating to the latest PowerShell 7 is straightforward and highly recommended. Use the or winget on Windows, Homebrew on macOS, and the system package manager on Linux. Always verify the version after updating. Regular updates ensure you have the latest language features, security patches, and performance gains. how to update power shell
$PSVersionTable
sudo dpkg -i powershell_<version>.deb