$$ \newcommand\Tr{\mathrm{Tr}} \newcommand{\braket}[2]{\langle #1 \mid #2 \rangle} \newcommand\I{\mathbb{I}} \newcommand{\avg}[1]{\left< #1 \right>} \newcommand{\RD}{D} \newcommand{\ri}{\mathrm{i}} \DeclareMathOperator{\sign}{sign} \DeclareMathOperator{\Sign}{Sign} \newcommand{\ii}{\mathrm i} \newcommand{\vv}{\mathrm v} \newcommand{\ff}{\mathrm f} \newcommand{\mm}{\mathrm m} \newcommand{\ee}{\mathrm e} \newcommand{\xx}{\mathrm x} \newcommand{\RR}{\mathrm R} \newcommand{\dd}{\mathrm d} \newcommand{\FF}{\mathrm F} \newcommand{\BB}{\mathrm B} \newcommand{\vph}{v_{\mathrm{ph}}} $$

PowerShell Version

To check PowerShell version, you can use $PSVersionTable command.

Check PowerShell Version

Basically, there are two different PowerShell versions which cling to its edition:

  • Desktop Edition
    This edition starts from PowerShell version 1 to 5.1. $PSVersionTable.PSEdition is set to Desktop. This version is built on top of .NET Framework.
  • Core Edition
    This edition starts from PowerShell >= 6. $PSVersionTable.PSEdition is set to Core. This version is built on top of .NET Core.