DirectoryEntry::DeleteTree Method ()
.NET Framework (current version)
Deletes this entry and its entire subtree from the Active Directory Domain Services hierarchy.
Assembly: System.DirectoryServices (in System.DirectoryServices.dll)
| Exception | Condition |
|---|---|
| InvalidOperationException | The specified DirectoryEntry is not a container. |
Of the Active Directory Service Interfaces (ADSI) system-supplied providers, only the Lightweight Directory Access Protocol (LDAP) currently supports this operation.
Caution |
|---|
The entry and its entire subtree are deleted from the Active Directory Domain Services hierarchy. |
Use DirectoryServicesPermission for deleting entries from the Active Directory Domain Services hierarchy. Associated enumeration: System.DirectoryServices::DirectoryServicesPermissionAccess.
DirectoryServicesPermission
To delete the entry and its children.
.NET Framework
Available since 1.1
Available since 1.1
Show:
