no, that's OK - it gave me another way to look at it, that's always useful.
--
Charlie.
http://msmvps.com/xperts64 http://mvp.support.microsoft.com/profile/charlie.russel
"Andy Schneider" <andy@xxxxxx-powershell.com> wrote in message
news:ECF7AE5A-C0C4-4CBA-AC1F-FF9318B96557@xxxxxx
Quote:
> Sorry.. thats what I get for trying to answer questions before I finish my
> coffee in the morning 
>
> Andy
>
>
> "Charlie Russel - MVP" <charlie@xxxxxx> wrote in message
> news:FD2A2D4F-5746-4237-9E9B-B177780C81C8@xxxxxx Quote:
>> No help - returns the same for any version of Vista with SP1 as it does
>> for Server 2008 RTM. But a good way to get the build number, certainly.
>>
>> --
>> Charlie.
>> http://msmvps.com/xperts64
>> http://mvp.support.microsoft.com/profile/charlie.russel
>>
>>
>> "Andy Schneider" <andy@xxxxxx-powershell.com> wrote in message
>> news:9265C697-5DE4-4C8E-BAD3-B8023214FA79@xxxxxx Quote:
>>> get-wmiobject win32_operatingsystem
>>>
>>> This will give you BuildNumber and Version
>>>
>>> Andy
>>> http://get-powershell.com
>>>
>>>
>>>
>>>
>>> "Charlie Russel - MVP" <charlie@xxxxxx> wrote in
>>> message news:6116302E-00CF-46C6-A17B-4F35EA5575C9@xxxxxx
>>>>I need a way to determine what Windows version and edition a script is
>>>>running on. I can get the build number, that's trivial:
>>>>
>>>> $Build=(get-item 'HKLM:/Software/Microsoft/Windows
>>>> NT/CurrentVersion').getvalue('CurrentBuildNumber')
>>>>
>>>> But it doesn't much help when Windows Vista SP1 is 6001 and so is
>>>> Windows Server 2008. And also doesn't tell me which edition. The
>>>> ProductID:
>>>>
>>>> $ProductID=(get-item 'HKLM:/Software/Microsoft/Windows
>>>> NT/CurrentVersion').getvalue('ProductID')
>>>>
>>>> could probably do it, but I'm not at all sure what I'm looking at
>>>> there, and how to parse it for what's important. First, does anyone
>>>> know a reference that gives the relevant numbers for the various
>>>> editions of Windows. And second, could someone suggest a regex to parse
>>>> it into consituent parts? Or, alternately, does someone have a better
>>>> location to get the version and edition of Windows?
>>>>
>>>> Thanks,
>>>>
>>>> --
>>>> Charlie.
>>>> http://msmvps.com/xperts64
>>>> http://mvp.support.microsoft.com/profile/charlie.russel
>>>>
>>>>
>>> >> >