Two ways:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
PS> $PSVersionTable Name Value ---- ----- PSVersion 5.0.9879.0 WSManStackVersion 3.0 SerializationVersion 1.1.0.1 CLRVersion 4.0.30319.0 BuildVersion 6.4.9879.0 PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} PSRemotingProtocolVersion 2.2 PS> Get-Host Name : ConsoleHost Version : 5.0.9879.0 InstanceId : 921cb62e-6fa2-4b7a-9821-3e28b90006c9 UI : System.Management.Automation.Internal.Host.InternalHostUserInterface CurrentCulture : en-US CurrentUICulture : en-US PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy IsRunspacePushed : False Runspace : System.Management.Automation.Runspaces.LocalRunspace |
And if you want to check whether PowerShell is installed or not, check the Registry.