windows powershell get windows version code example Example: check powershell version PS C:\> $PSVersionTable.PSVersion