Upgrade Powershell -
Older versions like PowerShell 2.0 are officially deprecated and lack critical logging features. Version 5.1 and 7 offer advanced PowerShell logging and language mode enhancements that help prevent malicious script execution.
If you upgraded to PowerShell 7, the Major version should now reflect . Note that the executable for PowerShell 7 is pwsh.exe , while the legacy version remains powershell.exe . Upgrading in Specialized Environments upgrade powershell
:Run this command in an elevated PowerShell session to download and run the MSI installer automatically: iex "& $(irm https://aka.ms/install-powershell.ps1) -UseMSI" . Older versions like PowerShell 2
: sudo apt-get update && sudo apt-get upgrade powershell Fedora/RedHat : sudo dnf upgrade powershell . Verifying the Version upgrade powershell