IADsComputer Method: IsValid

IsValid
(
ClassName  As String,
RelativeName As String
)As Boolean;

Parameters

[in] String ClassName
Class that can be the name of an object. The ClassName could be either "User" or "Group".

[in] String RelativeName
Name of the actual object on the computer, e.g., John is the RelativeName with ClassName User.

Description
Returns TRUE if RelativeName is a valid Name of the given ClassName type.

Example

Dim ComputerObject As IADsComputer
'Fill in the correct values for <DomainName> and <ComputerName>
Set ComputerObject = GetObject("NTDS://<DomainName>/<ComputerName>")
Debug.Print ComputerObject.IsValid("User", "UserName")
Debug.Print ComputerObject.IsValid("Group", "GroupName")

 

See Also