IComputerTarget Interface
Applies To: Windows Server Update Services
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)
Syntax
public interface IComputerTarget
public interface class IComputerTarget
type IComputerTarget = interface end
Public Interface IComputerTarget
Properties
Name | Description | |
---|---|---|
BiosInfo | Gets the BIOS information of the client. |
|
ClientVersion | Gets the version of the client. |
|
ComputerRole | Gets the computer role. |
|
ComputerTargetGroupIds | Gets the GUIDs of the computer group or groups to which this computer belongs. |
|
FullDomainName | Gets the full domain name of the client. |
|
Id | Gets the GUID of the client computer. |
|
IPAddress | Gets the IP address of this computer. |
|
LastReportedInventoryTime | Get the UTC time at which this computer last reported inventory to the server. |
|
LastReportedStatusTime | Gets the last time this client sent its update installation status to the WSUS server. |
|
LastSyncResult | Get the result of the last synchronization performed by this computer. |
|
LastSyncTime | Gets the UTC time at which the client last synchronized itself with the WSUS server. |
|
Make | Gets the make of the client computer. |
|
Model | Gets the model of the client computer. |
|
OSArchitecture | Gets the operating system architecture (32-bit or 64-bit). |
|
OSDescription | Gets the description of the operating system. |
|
OSFamily | Gets the family to which the client computer operating system belongs. |
|
OSInfo | Gets the operating system information of the client computer. |
|
ParentServerId | Get the GUID of the downstream WSUS server from which the client last synchronized. |
|
RequestedTargetGroupName | Gets the name of the computer group to which this computer claims to belong. |
|
RequestedTargetGroupNames | Gets the names of the computer groups to which this computer target claims to belong. |
|
SyncsFromDownstreamServer | Gets whether this computer synchronizes from a downstream server or from the current server. |
Methods
Name | Description | |
---|---|---|
Delete() | Removes the client computer from the list of clients known to WSUS. |
|
GetComputerTargetGroups() | Gets the computer groups to which this computer belongs. |
|
GetHashCode() | Gets a hash code for this computer for use in hashing algorithms and data structures such as hash tables. |
|
GetInventory() | Gets the inventory items for this computer. All inventory items are returned. |
|
GetInventory(String[]) | Gets the inventory items for this computer. Windows Management Instrumentation (WMI) is used to create the hardware inventory. The configuration file, InventoryRules.xml, lists the WMI classes and the specific properties used. The configuration file is signed and cannot be altered. |
|
GetParentServer() | Gets the server from which this computer last synchronized. |
|
GetUpdateInstallationInfoPerUpdate() | Gets the installation state for all approved updates. |
|
GetUpdateInstallationInfoPerUpdate(UpdateScope) | Gets installation information for all updates matching the specified search filter for this computer. |
|
GetUpdateInstallationSummary() | Gets the installation summary for all updates on this computer. |
|
GetUpdateInstallationSummary(UpdateScope) | Gets the installation summary for all updates that match the specified scope on this computer. |
|
PurgeAssociatedReportingEvents(DateTime, DateTime) | Removes the events that are associated with the client. |
Examples
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
See Also
Microsoft.UpdateServices.Administration Namespace
Return to top