Service Pack It Up
Figure out which Service Pack you have running on your machines with this tool tip from Don.
Welcome to Mr. Roboto! Most of you know me as Beta Man, but I've taken on a
new role at Redmond
. I'm strapping on a tin helmet and diving into the
world of Windows automation.
Let me be perfectly clear right up front -- this isn't just a scripting column.
Sure, I'll turn to scripting when it's the right technique for the job at hand
(as I have this month), but this column is primarily about the job. More specifically,
this column will focus on tools and tricks for getting the job done.
Sometimes that will mean a Resource Kit tool, other times a free tool from
someone else, or occasionally even a script. I'll always try to give you some
additional tips on how you can tweak or extend the script, tool or whatever
so you can use it for other purposes. My primary focus each month, though, will
be on using the tool or script to automate a Windows administrative task
and help you get the job done faster and easier.
This month, I'll focus on an often annoying task that's hard to do without
using a heavy-duty solution like Microsoft Systems Management Server: figuring
out which service pack is running on a specific set of computers. First, I have
to offer a few caveats. My solution uses a tool that you will run on your
Windows Administrator’s task would you like Mr. Roboto to
automate next? Send your suggestions to email@example.com
It will use your network to contact whichever computers you specify, meaning
you need to have those computers turned on and connected. You'll also need to
either turn off the Windows Firewall (or whatever local firewall you may be
using) or configure it to allow remote administration traffic (specifically,
the tool connects to the Windows Management Instrumentation service on each
computer you target).
This script should work with NT-based computers all the way back to Windows NT 4, including Windows 2000, Windows XP and Windows Server 2003. The account you use to run the tool needs to have local administrator permissions targeted for each computer, which means you'll probably need to run the tool as a domain admin (launch the tool using RunAs if you need to specify alternate credentials).
I wrote this tool as a VBScript, but it's written in the WSF format, meaning
you can just run it as a command-line tool. Its name is ListServicePack.wsf,
and it accepts a few command-line arguments (including /?, if you need help
with it) that tell it what to do. For example, if you have a text file that
contains the computer names you want to check (one computer name per line in
the file), run:
(or whatever the filename is). If you just want to test it with a single computer,
instead. Or, if you want to try and hit every computer in an Active Directory
organizational unit, run:
specifying the appropriate Organizational Unit (OU) name instead of "Sales;"
tack on "/recurse" to process sub-OUs
as well. You can also specify the "/output:filename"
argument, which writes the tool's output to the specified text file, rather
than just displaying everything on-screen. If you run the script on an XP or
2003 machine, specifying the "/ping"
argument will help reduce the wait time for computers that aren't available.
The tool has some other goodies, too. Run it with "/?"
to get a complete breakdown of what it can do. This is a great, easy-to-use
tool for quickly checking the service pack level on a number of machines. If
you're a VBScript fan, feel free to crack it open and play with it. Otherwise,
just use it as-is to help make your administrative life a little bit easier.
Don Jones is a multiple-year recipient of Microsoft’s MVP Award, and is an Author/Evangelist for video training company Pluralsight. Don is also a co-founder and President of PowerShell.org, a community dedicated to Microsoft’s Windows PowerShell technology. Don has more than two decades of experience in the IT industry, and specializes in the Microsoft business technology platform. He’s the author of more than 50 technology books, an accomplished IT journalist, and a sought-after speaker and instructor at conferences worldwide. Reach Don on Twitter at @concentratedDon, or on Facebook at Facebook.com/ConcentratedDon.