IADsContainer Method: Delete

Delete
(
 Class As String,
 RelativeName As String
);

Parameters

[in] String Class
Class that is the name of an object in DirectScript, e.g., "User", "Group" or "Computer". Possible values for the respective containers are specified below:

Computer Container

"User", "Group", "PrintQueue" and "Service"

Domain Container

"User", "Group" and "Computer"

File Container

"File", "Directory" and "Share"

RegistryKey Container

"RegKey" and "RegValue"

[in] String RelativeName
Name of an actual object in the namespace, e.g., John is the RelativeName with Class "User". 

Description
Deletes the object identified by the provided Class and RelativeName.

Example

Dim ContainerObject As IADsContainer
Set ContainerObject = GetObject("NTDS://YourDomainName")
ContainerObject.Delete "User", "UserName"

 

See Also