PSVersionTable

A read-only variable (as $PSVersionTable) to get the current PowerShell version. This command can only be run under PowerShell. More information: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_automatic_variables#psversiontable.

$PSVersionTable

$PSVersionTable.PSVersion

$PSVersionTable.PSCompatibleVersions

$PSVersionTable.GitCommitId

$PSVersionTable.PSEdition