Retrieves a collection of target computers whose full domain name contains the given string.

public ComputerTargetCollection SearchComputerTargets(Stringname);
Public Function SearchComputerTargets( _
  ByVal name As String _
) As ComputerTargetCollection
Implements IUpdateServer.SearchComputerTargets


  • name
    String to search for. The string must be less than 256 characters. The method compares the string to the full domain name of each target computer. The target is added to the returned collection if the string is a substring of the target's full domain name. The comparison is case-insensitive.

Return Value

A ComputerTargetCollection collection of target computers whose name contains the search string. The collection is empty if no matches are found.


Exception type Condition
System.ArgumentNullException name cannot be null.
System.ArgumentOutOfRangeException name cannot be an empty string or greater than 255 characters.


Server Requires Windows Server 2003 or Windows 2000 Server SP4 and later.

Defined in Microsoft.UpdateServices.Administration.


Requires Microsoft.UpdateServices.Administration (in Microsoft.UpdateServices.Administration.dll).

.NET Framework

Requires .NET Framework 1.1.