Avatar of Yashy
Yashy
Flag for United Kingdom of Great Britain and Northern Ireland asked on

How to determine which version of Windows is running on PC's in our domain environment?

hi guys

We have around 150 PC's on a particular domain. We wanted to basically obtain the list of PC's which are on Windows XP and those which are on Windows 7 by extracting the information from AD?

The domain controller where all this information sits is a Windows 2003 server, so I don't have powershell sadly to run queries.

Any help would be great.

Thank you
Yashy
Windows BatchVB ScriptShell Scripting

Avatar of undefined
Last Comment
NVIT

8/22/2022 - Mon
Muhammad Mulla

There is a vbscript posted here that should work.
SOLUTION
Bill Prew

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Guy Lidbetter

You could use LDIFDE (for txt file) or CSVDE (For csv file)...

ldifde -f output.txt -r "(&(objectClass=computer)(operatingSystem=Windows XP*))" -d "dc=mydomain,dc=com" -p subtree -l "cn,operatingSystem"
csvde -f output.csv -r "(&(objectClass=computer)(operatingSystem=Windows XP*))" -d "dc=mydomain,dc=com" -p subtree -l "cn,operatingSystem"

Just change (operatingSystem=Windows XP*) to (operatingSystem=Windows 7*) for windows 7 machines... I couldn't rememer how to get it to do an OR... alternatively use (operatingSystem=Windows*) and just filter the CSV in excel....
SOLUTION
NVIT

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Steve Knight

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Steve Knight

The logs made there btw look along the lines of this, same information in a file for each day, os, pc name, and user.

2015-03-24 22:31:24 - ® Windows Server® 2008 Standard SP2 - FS1 - administrator
2015-03-24 22:32:52 - ® Windows Server® 2008 Standard SP2 - FS1 - administrator
2015-03-24 22:37:13 - Windows 2000 Server SP4 - CS1 - administrator

Open in new window


Name: PC009
Manufacturer: System manufacturer
Model: System Product Name
Serial Number: System Serial Number
BIOS Version: 9012
BIOS Date: 10/29/2012
Operating System: Microsoft Windows 7 Professional 
OS Service Pack: Service Pack 1
Physical Memory: 7885.98
HDD Size: 465.75
Processor: Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz
CPU Current Clock Speed: 1584
Available space: 391.52
MAC Addresses: 50:46:5D:90:A5:BE,50:46:5D:90:A5:BE
IP Addresses: 10.1.4.239,fe80::441b:690e:14:6d38
Network: Outside
User: my.name
User domain: DOMAIN
Network: Outside
Word version: 14.0
Outlook: 14.0.0.7143

Open in new window

This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
SOLUTION
Guy Lidbetter

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Yashy

ASKER
haha....awesome man. You got there in the end:).

Guys, thank you for your help.

Every single one of them was helpful.

I've managed to run Guy's and Steve's script too and got the information.
NVIT

Thanks for the update, Yashy. Much appreciated. Have a good weekend.