Directory Services |
The DsRemoveDsServer function removes all traces of a directory service agent (DSA) from the global area of the directory service.
DWORD DsRemoveDsServer( HANDLE hDs, LPTSTR ServerDN, LPTSTR DomainDN, BOOL* fLastDcInDomain, BOOL fCommit );
DC=TestDC,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=fabrikam,DC=com
Return Code | Description |
---|---|
ERROR_ACCESS_DENIED | The caller does not have permissions to delete ServerDN. |
ERROR_DS_BAD_NAME_SYNTAX | Returned when fCommit is non-zero and the syntax of ServerDN is invalid. |
ERROR_DS_CANT_DELETE_DSA_OBJ | The bind handle supplied in hDs is currently bound to ServerDN. |
ERROR_DS_NO_CROSSREF_FOR_NC | Cannot find a cross reference object for DomainDN. |
ERROR_INVALID_PARAMETER | One or more parameters are invalid. |
RPC_S_CANNOT_SUPPORT | The DsRemoveDsServer function is not supported. |
RPC_S_INVALID_VERS_OPTION | A versioning error occurred. |
Client: Included in Windows XP and
Windows 2000 Professional.
Server: Included in Windows Server 2003 and
Windows 2000 Server.
Redistributable: Requires Active Directory Client Extension
on Windows NT 4.0 SP6a and Windows 95/98/Me.
Unicode: Implemented as Unicode and ANSI versions on Windows
NT/2000/XP.
Header: Declared in Ntdsapi.h.
Library: Use Ntdsapi.lib.
DsBind, DsBindWithCred, DsRemoveDsDomain, Domain Controller and Replication Management Functions