<div class="content"><p align="right"><a href="https://msdn.microsoft.com/en-us/library/db6c9aad-5736-40c5-af86-538dd439134c" data-linktype="external">msdn link</a></p><p>The <b>DsrDeregisterDnsHostRecords</b> method SHOULD<a id="Appendix_A_Target_169"></a><a aria-label="Product behavior note 169" href="0c858a52-732a-43ec-85dd-e44b357c1898#Appendix_A_169" data-linktype="relative-path">&lt;169&gt;</a> delete all of the <a href="b5e7d25a-40b2-41c8-9611-98f53358af66#gt_604dcfcd-72f5-46e5-85c1-f3ce69956700" data-linktype="relative-path">DNS</a> SRV records registered
by a specified <a href="b5e7d25a-40b2-41c8-9611-98f53358af66#gt_76a05049-3531-4abd-aec8-30e19954b4bd" data-linktype="relative-path">domain
controller</a>. For the list of SRV records that a domain registers, see <a href="../ms-adts/d2435927-0999-4c62-8c6d-13ba31a52e1a" data-linktype="relative-path">[MS-ADTS]</a>
section <a href="../ms-adts/c1987d42-1847-4cc9-acf7-aab2136d6952" data-linktype="relative-path">6.3.2.3</a>,
&#34;SRV Records Registered by DC&#34;. </p><dl>
<dd>
<div><pre> NET_API_STATUS DsrDeregisterDnsHostRecords(
   [in, unique, string] LOGONSRV_HANDLE ServerName,
   [in, unique, string] wchar_t* DnsDomainName,
   [in, unique] GUID* DomainGuid,
   [in, unique] GUID* DsaGuid,
   [in, string] wchar_t* DnsHostName
 );
</pre></div>
</dd></dl><p><b>ServerName: </b>The custom <a href="b5e7d25a-40b2-41c8-9611-98f53358af66#gt_44deb72d-c62b-4335-90e4-b9fd4dd782ed" data-linktype="relative-path">binding handle</a>, as defined
in section <a href="3b224201-b531-43e2-8c79-b61f6dea8640" data-linktype="relative-path">3.5.4.1</a>,
that represents the connection to the DC.</p><p><b>DnsDomainName: </b>A null-terminated <a href="b5e7d25a-40b2-41c8-9611-98f53358af66#gt_c305d0ab-8b94-461a-bd76-13b40cb8c4d8" data-linktype="relative-path">Unicode</a> string that
specifies the <a href="b5e7d25a-40b2-41c8-9611-98f53358af66#gt_1769aec9-237e-44ed-9014-1abb3ec6de6e" data-linktype="relative-path">FQDN</a>.</p><p><b>DomainGuid: </b>A pointer to the domain <a href="b5e7d25a-40b2-41c8-9611-98f53358af66#gt_f49694cc-c350-462d-ab8e-816f0103c6c1" data-linktype="relative-path">GUID</a>. If the value is not
NULL, the DNS SRV record of type
_ldap._tcp.DomainGuid.domains._msdcs.DnsDomainName is also deregistered.</p><p><b>DsaGuid: </b>A pointer to the objectGUID of the
DC&#39;s NTDSDSA object. For details about the NTDSDSA object, see [MS-ADTS]
section <a href="../ms-adts/8ebf2419-1169-4413-88e2-12a5ad499cf5" data-linktype="relative-path">6.1.1.2.2.1.2.1.1</a>.
If the value is not NULL, the CNAME <a href="https://go.microsoft.com/fwlink/?LinkId=90264" data-linktype="external">[RFC1035]</a> record of
the domain in the form of DsaGuid._msdcs.DnsDomainName is also deregistered.</p><p><b>DnsHostName: </b>A null-terminated Unicode string
that specifies the FQDN of the DC whose records are being deregistered. </p><p><b>Return Values: </b>The method returns 0x00000000
on success; otherwise, it SHOULD return the following error code.</p><table><thead>
  <tr>
   <th>
   <p>Return Value/Code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>0x00000032</p>
  <p>ERROR_NOT_SUPPORTED</p>
  </td>
  <td>
  <p>The request is not supported. This error value is
  returned when <b>DsrDeregisterDnsHostRecords</b> is called on a machine that
  is not a DC.</p>
  </td>
 </tr></tbody></table><p>The server determines if the client has sufficient <a href="b5e7d25a-40b2-41c8-9611-98f53358af66#gt_d8092e10-b227-4b44-b015-511bb8178940" data-linktype="relative-path">privileges</a> (as specified in
section <a href="1ec94886-2b64-45af-b68e-3d9faa36617c" data-linktype="relative-path">3.5.4.2</a>) with
the Access Request mask set to the NETLOGON_CONTROL_ACCESS mask.</p><p>If the client does not have sufficient privilege, the server
MUST return ERROR_ACCESS_DENIED.</p><p>If the <i>DnsHostName</i> parameter is not null, the server
MUST attempt to delete the DNS SRV records registered for the DC <i>DnsHostName</i>,
as specified in [MS-ADTS] section 6.3.2.3.</p><p>If the <i>DomainGuid</i> parameter is not null, then the
server MUST attempt to delete the domain-GUID-based SRV record.</p><p>If the <i>DsaGuid</i> parameter is not null, then the server
MUST attempt to delete the domain CNAME record.</p><p>The deletion of <a href="b5e7d25a-40b2-41c8-9611-98f53358af66#gt_8abdc986-5679-42d9-ad76-b11eb5a0daba" data-linktype="relative-path">site</a>-specific records MUST
be attempted for every site in the enterprise of the DC on which the method is
executed.</p><p>Unless stated otherwise, if the attempt to delete any records
documented previously fails for any reason, then the server MUST ignore the
error and continue message processing.</p><p>It is possible that this method call will create a
time-consuming run that generates significant network traffic for enterprises
with many sites.</p></div>