My powershell version is:
Name Value
---- -----
PSVersion 5.1.19041.1682
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.1682
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
I have the following command that will update to the latest version:
iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"
Can I use the above command to update my Powershel or is there another way to do this?
If I update the powershel, will the scripts I already have work normally?
powershell.exe
version 5.1] ///// [2] what once was namedpowershell core
but is now named "powershell" [pwsh.exe
version 7+] ///// the command you posted will install/upgrade the 2nd of those ...pwsh.exe
. ///// they can exist side-by-side & you cannot safely remove the windows version since it is deeply embedded in windows ... but it will not be upgraded. the cross-platform ps7+ will be upgraded.