Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 826
  • Last Modified:

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.
0
pma111
Asked:
pma111
  • 2
1 Solution
 
Krzysztof PytkoActive 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 PytkoActive 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

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now