Partager via


IComputerTarget.Delete Method ()

 

Applies To: Windows Server Update Services

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

Namespace:   Microsoft.UpdateServices.Administration
Assembly:  Microsoft.UpdateServices.Administration (in Microsoft.UpdateServices.Administration.dll)

Syntax

void Delete()
void Delete()
abstract Delete : unit -> unit
Sub Delete

Remarks

The client is also removed from any group to which it belongs.

This operation requires WSUS Administrator privileges.

Examples

The following Visual Basic example iterates through the client computers of a server. If they have not contacted the server for over 30 days, they are deleted from the server.

Dim Computers As ComputerTargetCollection
Dim LastValidContactDate As DateTime
Dim NotContactedDays As Integer
NotContactedDays = 30
LastValidContactDate = DateTime.Now.Subtract(New TimeSpan(NotContactedDays, 0, 0, 0))
Computers = updateServer.GetComputerTargets
For Each computer As IComputerTarget In Computers
If computer.

Next

See Also

IComputerTarget Interface
Microsoft.UpdateServices.Administration Namespace

Return to top