1

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.

  • 1
    It sounds like you're looking for the edition (pro or enterprise) not the version (7). – joeqwerty Apr 20 '11 at 00: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. –  Apr 20 '11 at 01:02

3 Answers3

2

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.

Ben Pilbrow
  • 11,995
  • 5
  • 35
  • 57
RobW
  • 2,766
  • 1
  • 17
  • 22
2

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.

joeqwerty
  • 108,377
  • 6
  • 80
  • 171
0

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.

SpacemanSpiff
  • 8,733
  • 1
  • 23
  • 35