Click to Rate and Give Feedback
MSDN
MSDN Library
Using WSUS
 Reporting Installation Status Total...
Reporting Installation Status Totals by Client
Reporting Installation Status Totals by Client

The following example shows how to retrieve summary installation totals by client. For example, the totals reflect the number of updates installed on the client. Those updates that are not specifically deployed to the given client are reflected in the UnknownCount summary total.

IUpdateServer server = AdminProxy.GetUpdateServer();
  
//Retrieve the All Computers target group.
IComputerTargetGroup allComputersGroup = server.GetComputerTargetGroup(ComputerTargetGroupId.AllComputers);

//Retrieve the summary installation totals for each client.
foreach (IUpdateSummary summary in allComputersGroup.GetTotalSummaryPerComputerTarget())
{
  Console.WriteLine("Client: {0}\nInstalled: {1}\nPending restart: {2}" +
                    "\nDownloaded: {3}\nNot installed: {4}\nFailed: {5}\n" +
                    "\nNot applicable: {6}\nUnknown: {7}\n", 
                    server.GetComputerTarget(summary.ComputerId).FullDomainName,
                    summary.InstalledCount, summary.InstalledPendingRebootCount,
                    summary.DownloadedCount, summary.NotInstalledCount, 
                    summary.FailedCount, summary.NotApplicableCount,
                    summary.UnknownCount);
}



Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker