DsDeregisterDnsHostRecords function
The DsDeregisterDnsHostRecords function deletes DNS entries, except for type A records registered by a domain controller. Only an administrator, account operator, or server operator may call this function.
Syntax
DWORD DsDeregisterDnsHostRecords( _In_opt_ LPTSTR ServerName, _In_opt_ LPTSTR DnsDomainName, _In_opt_ GUID *DomainGuid, _In_opt_ GUID *DsaGuid, _In_ LPTSTR DnsHostName );
Parameters
- ServerName [in, optional]
-
The null-terminated string that specifies the name of the remote domain controller. Can be set to NULL if the calling application is running on the domain controller being updated.
- DnsDomainName [in, optional]
-
The null-terminated string that specifies the DNS domain name of the domain occupied by the domain controller. It is unnecessary for this to be a domain hosted by this domain controller. If NULL, the DnsHostName with the leftmost label removed is specified.
- DomainGuid [in, optional]
-
Pointer to the Domain GUID of the domain. If NULL, GUID specific names are not removed.
- DsaGuid [in, optional]
-
Pointer to the GUID of the NTDS-DSA object to be deleted. If NULL, NTDS-DSA specific names are not removed.
- DnsHostName [in]
-
Pointer to the null-terminated string that specifies the DNS host name of the domain controller whose DNS records are being deleted.
Return value
- NO_ERROR
-
Success
- ERROR_ACCESS_DENIED
-
The user is not authorized to perform this operation.
- ERROR_NOT_SUPPORTED
-
The specified server is not a DC.
Remarks
This function deregisters SRV and CNAME records only. It leaves type A records intact. Deletion of site specific records, for example, _ldap._tcp._<SiteName>._sites.dc._msdcs.<DnsDomainName>, is attempted for every site (<SiteName> in this example) in the enterprise of the domain controller on which the function is executed. Therefore, this function call could create a time-consuming run and may generate significant network traffic for enterprises with many sites.
Requirements
|
Minimum supported client |
Windows Vista |
|---|---|
|
Minimum supported server |
Windows Server 2008 |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names |
DsDeregisterDnsHostRecordsW (Unicode) and DsDeregisterDnsHostRecordsA (ANSI) |
See also