Discussion:
Get PowerShell Version?
(too old to reply)
ydroam
2006-12-27 16:56:50 UTC
Permalink
How can I find out the powershell version to find out if it's RC or
Final?
ydroam
2006-12-27 17:00:30 UTC
Permalink
Found Windows PowerShell under Windows XP - Software Updates. It would
say RC if it was right?
Post by ydroam
How can I find out the powershell version to find out if it's RC or
Final?
William Stacey [C# MVP]
2006-12-27 17:23:52 UTC
Permalink
I put this in my profile:
function Ver { get-host | select version }

I was thinking this as well. There should be some text field beyond version
that would explicitly show (CTP1, Beta1, Beta2, RTM, etc). The build
numbers don't mean much as you have to track them down and figure it out
each time.
--
William Stacey [C# MVP]

"ydroam" <***@gmail.com> wrote in message news:***@i12g2000cwa.googlegroups.com...
| How can I find out the powershell version to find out if it's RC or
| Final?
|
Sung M Kim
2006-12-27 17:40:34 UTC
Permalink
Even better ;p

function Ver { $host.Version }

On Dec 27, 12:23 pm, "William Stacey [C# MVP]"
Post by William Stacey [C# MVP]
function Ver { get-host | select version }
I was thinking this as well. There should be some text field beyond version
that would explicitly show (CTP1, Beta1, Beta2, RTM, etc). The build
numbers don't mean much as you have to track them down and figure it out
each time.
--
William Stacey [C# MVP]
| How can I find out the powershell version to find out if it's RC or
| Final?
|
Keith Hill [MVP]
2006-12-27 19:14:13 UTC
Permalink
Post by ydroam
How can I find out the powershell version to find out if it's RC or
Final?
OK since someone brought this up. Which is the more important/useful
version number and in which context?

24> $host.Version
Version
-------
1.0.0.0

25> (gcm "$PSHome\PowerShell.exe").FileVersionInfo.ProductVersion
6.0.5430.0

--
Keith
William Stacey [C# MVP]
2006-12-27 21:39:18 UTC
Permalink
Good question. What is a file version?
--
William Stacey [C# MVP]

"Keith Hill [MVP]" <***@mailhot.moc.nospam> wrote in message news:***@TK2MSFTNGP03.phx.gbl...
| "ydroam" <***@gmail.com> wrote in message
| news:***@i12g2000cwa.googlegroups.com...
| > How can I find out the powershell version to find out if it's RC or
| > Final?
|
| OK since someone brought this up. Which is the more important/useful
| version number and in which context?
|
| 24> $host.Version
| Version
| -------
| 1.0.0.0
|
| 25> (gcm "$PSHome\PowerShell.exe").FileVersionInfo.ProductVersion
| 6.0.5430.0
|
| --
| Keith
|
|
Krishna Vutukuri[MSFT]
2007-01-02 19:59:10 UTC
Permalink
Hi,

I wish a very Happy and Prosporous New Year to you all !!

Most installers use fileversion while updating a binary (as part of a QFE).
For example Windows update updates a binary only if the fileversion in QFE
is greater than the one on disk :-

1. Lets say an assembly (x.dll) with fileversion 2.0.0.0 is installed on a
machine.
Lets say there are 2 QFEs available for x.dll binaray:- QFE1 x.dll's
fileversion is 1.1.0.0 and QFE2 x.dll's fileversion is 2.1.0.0

Only QFE2 will update x.dll on the machine since its fileversion is greater
than the one on the disk.

For managed(CLR) assemblies there are 2 version numbers: AssemblyVersion and
FileVersion. Assembly version is used by the CLR loader / linker.
Installation technolgies might use both or just FileVersion.

Which one is most important:

It depends on the product you are working with and the scenarios. For
PowerShell, you may never need to know the fileversion number. To
distinguish between RC2 and RTM builds of Powershell use the following
registry information:

To check if PowerShell is installed use:

HKLM\Software\Microsoft\PowerShell\1 Install ( = 1 )

To check if RC2 or RTM is installed use:

HKLM\Software\Microsoft\PowerShell\1 PID (=89393-100-0001260-00301) -- For
RC2
HKLM\Software\Microsoft\PowerShell\1 PID (=89393-100-0001260-04309) -- For
RTM
--
Krishna[MSFT]
Windows PowerShell Team
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
Post by William Stacey [C# MVP]
Good question. What is a file version?
--
William Stacey [C# MVP]
| > How can I find out the powershell version to find out if it's RC or
| > Final?
|
| OK since someone brought this up. Which is the more important/useful
| version number and in which context?
|
| 24> $host.Version
| Version
| -------
| 1.0.0.0
|
| 25> (gcm "$PSHome\PowerShell.exe").FileVersionInfo.ProductVersion
| 6.0.5430.0
|
| --
| Keith
|
|
Loading...