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)
Namespace: Microsoft.UpdateServices.Administration
Assembly: Microsoft.UpdateServices.Administration (in Microsoft.UpdateServices.Administration.dll)
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