How to check the version of PowerShell

Method

You can check the version of PowerShell with the value of $PSVersionTable.

  1. Start PowerShell
  2. Type up to $psv
  3. Use Tab key to complete the input
  4. Enter
PS C:\> $PSVersionTable
 
Name Value
---- -----
PSVersion 5.1.14409.1012

You can also check the version with Get-Host cmdlet.
However, you need to be careful because the information displayed is “information about the host program that is running”.
Example: When running in VSCode’s “PowerShell Integrated Console”, the information displayed is different from that in PowerShell.