Service Pack Level Report

How can I (with free tools/scripts) produce a report of all computers in a domain with the following 4 fields:

Computer Name
Operating System (and most importantly this must include SERVICE PACK)
Computer status (ie disabled or not)
Modieified date (to see if the computer is being used or not)

I am only really bothered about clients (desktop/laptop) and not servers, if the report can filter down.
LVL 3
pma111Asked:
Who is Participating?
 
Krzysztof PytkoSenior Active Directory EngineerCommented:
You can simply use Microsoft DS Tools for that. Try on a DC in command-line to run this query

for enabled computers
dsquery * -filter "(&(objectClass=computer)(objectCategory=computer)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))" -attr Name operatingSystem operatingSystemServicePack whenChanged >>c:\enabled_comp.txt

Open in new window


for disabled
dsquery * -filter "(&(objectClass=computer)(objectCategory=computer)(userAccountControl:1.2.840.113556.1.4.803:=2))" -attr Name operatingSystem operatingSystemServicePack whenChanged >>c:\disabled_comp.txt

Open in new window


another option is to use Quest or Windows PowerShell module for AD, if it's an option :)

Regards,
Krzysztof
0
 
pma111Author Commented:
How do you take off the default results limit again?
0
 
Krzysztof PytkoSenior Active Directory EngineerCommented:
Oh, sorry forgot about that :) -limit 0 is required

Try this

enabled
dsquery * -filter "(&(objectClass=computer)(objectCategory=computer)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))" -limit 0 -attr Name operatingSystem operatingSystemServicePack whenChanged >>c:\enabled_comp.txt

Open in new window

       

disabled
dsquery * -filter "(&(objectClass=computer)(objectCategory=computer)(userAccountControl:1.2.840.113556.1.4.803:=2))" -limit 0 -attr Name operatingSystem operatingSystemServicePack whenChanged >>c:\disabled_comp.txt

Open in new window


Krzysztof
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.