David M. Stein's Blog

Windows Server 2008, WSUS and Other Stuff

WSUS 3.0 API Samples Download

Cool-er-est.  Gnarly.  Bomb-diggity.  Microsoft posted a neat-o set of API sample/examples for WSUS 3.0 on the Download Center yesterday.  Among the goodies packed inside this gem are those listed below.  I like the CleanStaleComputers feature.  Too bad they don't yet have a CleanStaleJokes feature.

Sample Name Language Description

ADImporter

Visual Basic

This tool allows you to pre-populate target groups with computers from Active Directory. The sample application connects to the default Active Directory domain controller, and lists the OUs and computers in the domain. It also lists the computer groups available on the WSUS server. Using this sample, you can select computers from Active directory and "register" the selected computers with Update Services. Note that each computer registered must be configured to talk to the WSUS server independently of using this tool.

ApprovedUpdatesToXML

Visual Basic

Creates an XML file with a list of approved updates and details of their approval including the groups that the update is approved for, and the approval action.

ApproveForOptionalInstall

Visual Basic

Approves a specified update for "optional install". This causes the update to be registered in the "Add/Remove Programs" Control Panel applet (also known as "Programs And Features" in Windows Vista) of the client machine. The user can choose to install the update using the Add/Remove Programs Control Panel applet.

CleanStaleComputers

Visual Basic

This sample application removes computers from the WSUS server that have not contacted the server in a specified number of days.
USAGE:
CleanStaleComputers /DAYS:[1-365] /DELETE:{YES | NO} /PROMPT:{YES | NO}
/DAYS. Days since the computer contacted the server
/DELETE. Delete from the WSUS server or move to the Stale computers group
/PROMPT. Prompt before moving/deleting computers

ComputerStatusToXML

Visual Basic

Creates an XML file with a list of computers on the WSUS server, and the status of the updates approved for each computer. The list can optionally include computers that are rolled up from downstream WSUS servers.
USAGE:
ComputerStatusToXML.exe [IncludeDownstreamComputers]

ComputersNeedingReboot

Visual Basic

Creates an HTML report that lists computers that have installed updates, but still require a reboot to be fully patched

ListApprovedUpdates

Visual Basic

Displays a list of updates that have been approved after a specified date and also creates a text report that lists the updates.

UpdateStatusToCSV

Visual Basic

Creates a simple CSV file with a list of approved updates and a summary of the status of the updates on each computer

UpdateStatusToXML

Visual Basic

Creates an XML file with a list of updates, with update status for each computer client.

UpdatesToXML

Visual Basic

Creates an XML file with a list of updates and information about each update, including ID, title, description, KB articles etc.

WsusMigrate

Visual C#

WSUS Migration Tools can assist in migrating update approvals and target groups from one WSUS server to another. See the ReadMe under the WsusMigrate folder for more information on these tools.

Share this post:                                       

Comments

Remove stale computers from WSUS :: h0bbel.p0ggel.org said:

Pingback from  Remove stale computers from WSUS :: h0bbel.p0ggel.org

# October 6, 2008 6:53 AM

David M. Stein's Blog said:

I was curious as to what topics or subjects I ramble about which gain the most "traction".

# March 8, 2009 9:21 AM