You can install PowerShell by downloading the appropriate installation package for your operating system from the following link:
https://aka.ms/powershell-release?tag=stable
For example, for Windows 10 64-bit, you would download the file named PowerShell-7.1.3-win-x64.msi
.
On macOS, you can install PowerShell using Homebrew, as shown in the following command:
brew install --cask powershell
For Linux and ARM, use the instructions at the following link: https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell
Now you can install the Visual Studio Code extension for PowerShell.