Install
- Official document address: https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows
- It is officially recommended to use the WinGet package manager to install PowerShell , but in actual operation, it is found that the version searched by
winget search Microsoft.PowerShell
is a few minor versions behind. For example, the latest version of PowerShell is already7.2.6
, but the search results are still7.2.1
, and then think about specifying the latest version to install and see if you can install the latest versionwinget install --id Microsoft.PowerShell --version 7.2.6
, and found that it still doesn’t work, so if you want to install the latest version of PowerShell , it is recommended to pass Download the PowerShell MSI package to install
Notice
- It will coexist with
Windows PowerShell 5.1
. It seems thatWindows PowerShell
andPowerShell
are two things here; - However, it will replace the lower version of PowerShell . If you want multiple versions of PowerShell to coexist , you can use the ZIP package installation method to install PowerShell to different directories to achieve multi-version coexistence;
Common commands
-
$PROFILE
View the path of the personal profile -
$PSVersionTable
view the version of PowerShell -
rm .\node_modules\ -Recurse -Force
remove directory
This article is reprinted from https://www.wujingquan.com/posts/a2c49dae.html
This site is for inclusion only, and the copyright belongs to the original author.