Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We are in the middle of doing physical inventory of all of our workstations, many of which were deployed in a hurry. Consequently, we do not have all of the information about them documented that we would like. We use a mix of Windows 7 Pro and Windows 7 Enterprise for licensing reasons. We know how many licenses are in use (we have a KMS server in-place), but we don't know which edition of Windows is installed on which specific workstation. So my question is as stands:

Is it possible to tell what edition of Windows a domain member is using through AD or some other similar mechanism? It would be really great if this information along with the machine's hostname could be pulled with a script, instead of pointing and clicking through the AD Remote Admin tools.

I do have Domain Admin rights if that is required.

share|improve this question
1  
It sounds like you're looking for the edition (pro or enterprise) not the version (7). –  joeqwerty Apr 20 '11 at 0:05
    
I apologize you are correct. I am looking for the edition and not the version. I haven't really got the Windows nomenclature right. –  kce Apr 20 '11 at 1:02

3 Answers 3

up vote 2 down vote accepted

Dsquery will do the job:

dsquery * domainroot -limit 0 -filter "(objectCategory=computer)" -attr name operatingsystem

This command dumps what AD knows about the OS of the member computer.

share|improve this answer
    
This is exactly what I was looking for. Thanks! –  kce Apr 20 '11 at 1:04

If I'm not mistaken, AD only stores the version, service pack, and build number of the OS but not the edition.

You can get the edition by using WMI to query the Win32_OperatingSystem class.

EDIT

After taking another look at the operatingSystem attribute of a computer object via ADSIEdit it appears that for Windows Vista/7/2K8 and later the operatingSystem attribute will show both the version and edition while for Windows XP/2003 and earlier it only shows the version but not the edition.

share|improve this answer

Each computer object should have this attribute set. Use Powershell (or PowerGUI if your hate the CLI) to dump a list of all computer objects and their O/S versions.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.