This document
contains notes for installing the API samples and applications for Windows
Server Update Services.
Overview
The
purpose of these samples is to introduce developers and administrators to the
Update Services server API. The WSUS server API allows administrators and
developers to control the functionality of the Update Services server.
Getting
Started
To install the samples, run the Update Services API Samples and Tools
Setup.msi file located in the same folder as this document. This will
install the samples and tools referenced in this document. The tools will be
installed in sub folder of \Program Files named Update Services API
Samples and Tools. A shortcut to this folder will be created in the All
Users start menu. The End-User License Agreement (EULA.rtf) for the samples is
available for reference in the install folder.
Each of the
samples is located in a subfolder of the Update Services API Samples and
Tools folder and contains the source code and project files for the sample,
along with a compiled version of the sample that can be used if you do not have
Visual basic .NET available.
Sample descriptions
Sample Name |
Description |
ApprovedUpdatesToXML |
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. |
UpdateStatusToXML |
Creates an XML file with a list of approved updates and their
installed status on client computers. Each update section contains an overall
summary for all computers, a summary per target group and the status of the
update on each computer within each target group. |
ComputerStatusToXML |
Creates an XML file with a list computers on the Update Services
server, and the status of updates approved for each computer. |
UpdateStatusToCSV |
Creates a simple CSV file with a list of approved updates and a
summary of the status of the updates on each computer |
UpdatesToXML |
Creates an XML file with a list of updates and interesting
information about each update, including ID, title, description, KB articles
etc. |
Update Services Notifications |
A Windows Service that periodically sends email notifications to
selected users about synchronized updates, and an update status summary. To
install the service, run the setup and then run the Update Services
Notifications shortcut from the start menu to configure the service. |
ADImporter |
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 Update
Services 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 Update Services server independently of using this tool |
CleanStaleComputers |
This sample application removes computers from the Update
Services server that have not contacted the server in a specified number of
days. |
ComplianceReport |
Creates an HTML report that lists computers that do not have all
the approved updates installed |
ComputersNeedingReboot |
Creates an HTML report that lists computers that have installed
updates, but still require a reboot to be fully patched |
How to
build the samples
To build
the samples you must have Visual Basic .NET installed. If your Update Services
server is installed to a path other than C:\Program Files\Update Services\,
then the references to the Update Services .NET assemblies will need to be
updated. To do this:
1.
Open the project
2.
From the menu click Project, Add Reference.
3.
Click Browse
4.
Browse to <Program Files>\Update Services\Service, or
the install location of your WUS server.
5.
Select microsoft.updateservices.administration.dll
6.
Click OK.
7.
Click OK to add the reference.
8.
You should now be able to build the project. You'll need to do
this for each sample you want to build.
Notes
You must have a copy of Update Services installed to run the tools and/or build
the samples.