Compartilhar via


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
System_CAPS_pubproperty BiosInfo

Gets the BIOS information of the client.

System_CAPS_pubproperty ClientVersion

Gets the version of the client.

System_CAPS_pubproperty ComputerRole

Gets the computer role.

System_CAPS_pubproperty ComputerTargetGroupIds

Gets the GUIDs of the computer group or groups to which this computer belongs.

System_CAPS_pubproperty FullDomainName

Gets the full domain name of the client.

System_CAPS_pubproperty Id

Gets the GUID of the client computer.

System_CAPS_pubproperty IPAddress

Gets the IP address of this computer.

System_CAPS_pubproperty LastReportedInventoryTime

Get the UTC time at which this computer last reported inventory to the server.

System_CAPS_pubproperty LastReportedStatusTime

Gets the last time this client sent its update installation status to the WSUS server.

System_CAPS_pubproperty LastSyncResult

Get the result of the last synchronization performed by this computer.

System_CAPS_pubproperty LastSyncTime

Gets the UTC time at which the client last synchronized itself with the WSUS server.

System_CAPS_pubproperty Make

Gets the make of the client computer.

System_CAPS_pubproperty Model

Gets the model of the client computer.

System_CAPS_pubproperty OSArchitecture

Gets the operating system architecture (32-bit or 64-bit).

System_CAPS_pubproperty OSDescription

Gets the description of the operating system.

System_CAPS_pubproperty OSFamily

Gets the family to which the client computer operating system belongs.

System_CAPS_pubproperty OSInfo

Gets the operating system information of the client computer.

System_CAPS_pubproperty ParentServerId

Get the GUID of the downstream WSUS server from which the client last synchronized.

System_CAPS_pubproperty RequestedTargetGroupName

Gets the name of the computer group to which this computer claims to belong.

System_CAPS_pubproperty RequestedTargetGroupNames

Gets the names of the computer groups to which this computer target claims to belong.

System_CAPS_pubproperty SyncsFromDownstreamServer

Gets whether this computer synchronizes from a downstream server or from the current server.

Methods

Name Description
System_CAPS_pubmethod Delete()

Removes the client computer from the list of clients known to WSUS.

System_CAPS_pubmethod GetComputerTargetGroups()

Gets the computer groups to which this computer belongs.

System_CAPS_pubmethod GetHashCode()

Gets a hash code for this computer for use in hashing algorithms and data structures such as hash tables.

System_CAPS_pubmethod GetInventory()

Gets the inventory items for this computer. All inventory items are returned.

System_CAPS_pubmethod 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.

System_CAPS_pubmethod GetParentServer()

Gets the server from which this computer last synchronized.

System_CAPS_pubmethod GetUpdateInstallationInfoPerUpdate()

Gets the installation state for all approved updates.

System_CAPS_pubmethod GetUpdateInstallationInfoPerUpdate(UpdateScope)

Gets installation information for all updates matching the specified search filter for this computer.

System_CAPS_pubmethod GetUpdateInstallationSummary()

Gets the installation summary for all updates on this computer.

System_CAPS_pubmethod GetUpdateInstallationSummary(UpdateScope)

Gets the installation summary for all updates that match the specified scope on this computer.

System_CAPS_pubmethod 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