• 1. London, UK
  • 2. New York, NY
  • 3. Sydney, Australia
  • 4. Melbourne, Australia
  • 5. Paris, France
  • 6. Mumbai, India
  • 7. Moscow, Russia
  • 8. Bangalore, India
  • 9. San Francisco, CA
  • 10. Amsterdam, The Netherlands

Wednesday, October 04, 2006

 

HOW TO:Get PowerShell version info

Posted by Bharat Suneja at 4:55 PM
While the command ver could get you the version info on a command prompt, and winver does it in the GUI, if you're stumbling to find the command to get the version number of Windows PowerShell installed on your computer (like I did for a while), it is Get-Host.

Perhaps adding an alias for ver so it works out of the box would've been a good idea folks... ! :)

To add the alias: new-alias ver get-host

Labels:

4 Comments:

October 4, 2006 5:23 PM
Anonymous vivek said...

or you can type $host. there's lots of interesting variables, try get-variable and it will show you all.

 
January 8, 2008 9:13 AM
Blogger Aaron said...

$env:psver = $host.version.tostring()

 
December 23, 2008 3:58 AM
Blogger Thomas said...

One small point I discovered today. This is the version of the HOST, not of PowerShell itself. When run from, say the PowerShell prompt, it is indeed the same version. But if you run this command from the PowerShell Plus prompt, you get a different value (ie the version of the host, or of PowerShell Plus itself).

As we move forward into PowerShell Version 2, this distinction becomes more important.

 
February 6, 2009 4:10 AM
Anonymous liamfinnie said...

>$PSVersionTable

Name Value
---- -----
CLRVersion 2.0.50727.3082
BuildVersion 6.1.6949.0
PSVersion 2.0
PSCompatibleVersions {1.0, 2.0}

 

Post a Comment

Links to this post:

Create a Link

<< Home