Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

IComputerTarget Interface

Use this interface to get information about the client computer, remove the client from WSUS, determine the group to which it belongs, and get information about the updates approved for the client. To get this interface, call one of the following methods: Item; GetComputer; GetComputerTarget; GetComputerTarget; RegisterComputer.


Namespace: Microsoft.UpdateServices.Administration
Assembly: Microsoft.UpdateServices.Administration (in Microsoft.UpdateServices.Administration.dll)
public interface IComputerTarget
public interface IComputerTarget
public interface IComputerTarget

The following is a Visual Basic example which iterates through the client computers of a server. For each computer it gets the set of update installation information and prints out the title of the update and its installation status.

Dim Computers As ComputerTargetCollection
Dim InstallInfoCollection As UpdateInstallationInfoCollection
Computers = updateServer.GetComputerTargets
For Each computer As IComputerTarget In Computers
InstallInfoCollection = computer.GetUpdateInstallationInfoPerUpdate
'loop through the updates in the install info collection and output the update's name/install state
For Each InstallInfo As IUpdateInstallationInfo In InstallInfoCollection
Debug.WriteLine(InstallInfo.GetUpdate.Title + ": "  + InstallInfo.UpdateInstallationState.ToString)
Next
Next

Development Platforms

Target Platforms

Windows Server 2008, Windows Server 2003, Windows Server 2008 R2
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.