Service Pack Level

F

Frank

How can run a report on the service pack level on all of
my domain computers in active directory?

Thanks,
Frank
 
J

Joe Richards [MVP]

You can just do a simple ldap query and display the operatingsystem and
operatingsystemservicepack attributes.

Many ways to do that as ldap is a standard mechanism.

One way would be to do something like

adfind -b dc=domain,dc=com -f objectcategory=computer operatingsystem
operatingsystemservicepack

It would look something like:

[Mon 05/10/2004 16:05:53.97]
F:\temp>adfind -b dc=joe,dc=com -f objectcategory=computer operatingsystem
operatingsystemservicepack

AdFind V01.15.00cpp Joe Richards ([email protected]) April 2004

Using server: 2k3dc01.joe.com

dn:CN=2K3DC01,OU=Domain Controllers,DC=joe,DC=com
operatingSystem: Windows Server 2003
dn:CN=2K3UTL01,CN=Computers,DC=joe,DC=com
operatingSystem: Windows Server 2003
dn:CN=2K3WEB01,CN=Computers,DC=joe,DC=com
operatingSystem: Windows Server 2003
dn:CN=fastmofo,CN=Computers,DC=joe,DC=com
operatingSystem: Windows XP Professional
operatingSystemServicePack: Service Pack 1


4 Objects returned

[Mon 05/10/2004 16:05:58.94]
F:\temp>


Alternatively you can script it and dump it out in whatever format you want,
maybe pick up Robbie Allen's Active Directory Cookbook for scripting info, he
has lots of ready made scripts that are easy to modify.

joe
 
D

Dave Shaw [MVP]

Frank said:
How can run a report on the service pack level on all of
my domain computers in active directory?

Thanks,
Frank


A VBScript calling WMI will do it ...

For example:

On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from
Win32_OperatingSystem",,48)
For Each objItem in colItems
Wscript.Echo "BootDevice: " & objItem.BootDevice
Wscript.Echo "BuildNumber: " & objItem.BuildNumber
Wscript.Echo "BuildType: " & objItem.BuildType
Wscript.Echo "Caption: " & objItem.Caption
Wscript.Echo "CodeSet: " & objItem.CodeSet
Wscript.Echo "CountryCode: " & objItem.CountryCode
Wscript.Echo "CreationClassName: " & objItem.CreationClassName
Wscript.Echo "CSCreationClassName: " & objItem.CSCreationClassName
Wscript.Echo "CSDVersion: " & objItem.CSDVersion
Wscript.Echo "CSName: " & objItem.CSName
Wscript.Echo "CurrentTimeZone: " & objItem.CurrentTimeZone
Next


The CSDVersion attribute called reveals the Service Pack level. Run on my
computer, I get:


Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

BootDevice: \Device\HarddiskVolume2
BuildNumber: 2600
BuildType: Uniprocessor Free
Caption: Microsoft Windows XP Professional
CodeSet: 1252
CountryCode: 1
CreationClassName: Win32_OperatingSystem
CSCreationClassName: Win32_ComputerSystem
CSDVersion: Service Pack 2, v.2096
CSName: MALACHAI
CurrentTimeZone: -240


-ds
 
C

Cary Shultz [A.D. MVP]

I just love that computer name: fastmofo!

Cary

Joe Richards said:
You can just do a simple ldap query and display the operatingsystem and
operatingsystemservicepack attributes.

Many ways to do that as ldap is a standard mechanism.

One way would be to do something like

adfind -b dc=domain,dc=com -f objectcategory=computer operatingsystem
operatingsystemservicepack

It would look something like:

[Mon 05/10/2004 16:05:53.97]
F:\temp>adfind -b dc=joe,dc=com -f objectcategory=computer operatingsystem
operatingsystemservicepack

AdFind V01.15.00cpp Joe Richards ([email protected]) April 2004

Using server: 2k3dc01.joe.com

dn:CN=2K3DC01,OU=Domain Controllers,DC=joe,DC=com
operatingSystem: Windows Server 2003
dn:CN=2K3UTL01,CN=Computers,DC=joe,DC=com
operatingSystem: Windows Server 2003
dn:CN=2K3WEB01,CN=Computers,DC=joe,DC=com
operatingSystem: Windows Server 2003
dn:CN=fastmofo,CN=Computers,DC=joe,DC=com
operatingSystem: Windows XP Professional
operatingSystemServicePack: Service Pack 1


4 Objects returned

[Mon 05/10/2004 16:05:58.94]
F:\temp>


Alternatively you can script it and dump it out in whatever format you want,
maybe pick up Robbie Allen's Active Directory Cookbook for scripting info, he
has lots of ready made scripts that are easy to modify.

joe

--
Joe Richards Microsoft MVP Windows Server Directory Services
www.joeware.net


How can run a report on the service pack level on all of
my domain computers in active directory?

Thanks,
Frank
 
J

Joe Richards [MVP]

:blush:)

It is descriptive. I think it is the 2GB of RAM and the 800Mhz FSB...



--
Joe Richards Microsoft MVP Windows Server Directory Services
www.joeware.net


I just love that computer name: fastmofo!

Cary

You can just do a simple ldap query and display the operatingsystem and
operatingsystemservicepack attributes.

Many ways to do that as ldap is a standard mechanism.

One way would be to do something like

adfind -b dc=domain,dc=com -f objectcategory=computer operatingsystem
operatingsystemservicepack

It would look something like:

[Mon 05/10/2004 16:05:53.97]
F:\temp>adfind -b dc=joe,dc=com -f objectcategory=computer operatingsystem
operatingsystemservicepack

AdFind V01.15.00cpp Joe Richards ([email protected]) April 2004

Using server: 2k3dc01.joe.com

dn:CN=2K3DC01,OU=Domain Controllers,DC=joe,DC=com
operatingSystem: Windows Server 2003
dn:CN=2K3UTL01,CN=Computers,DC=joe,DC=com
operatingSystem: Windows Server 2003
dn:CN=2K3WEB01,CN=Computers,DC=joe,DC=com
operatingSystem: Windows Server 2003
dn:CN=fastmofo,CN=Computers,DC=joe,DC=com
operatingSystem: Windows XP Professional
operatingSystemServicePack: Service Pack 1


4 Objects returned

[Mon 05/10/2004 16:05:58.94]
F:\temp>


Alternatively you can script it and dump it out in whatever format you
want,

maybe pick up Robbie Allen's Active Directory Cookbook for scripting info,
he

has lots of ready made scripts that are easy to modify.

joe

--
Joe Richards Microsoft MVP Windows Server Directory Services
www.joeware.net


How can run a report on the service pack level on all of
my domain computers in active directory?

Thanks,
Frank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top