get powershell version code example
Example 1: check powershell version
PS C:\> $PSVersionTable.PSVersion
Example 2: How to get the latest powershell update
Install-Module -Name PowerShellGet -Force
Exit
PS C:\> $PSVersionTable.PSVersion
Install-Module -Name PowerShellGet -Force
Exit