Showing posts with label DNS. Show all posts
Showing posts with label DNS. Show all posts
Thursday, May 28, 2020
DNS Scavening not working
IF DNS Scavenging is enabled on the server , configured the Scavenging Cycle and Aging (No Refresh and Refresh interval) but old records are not deleting yet,
Thursday, October 6, 2016
Windows DNS Command Line
Query DNS forest-wide partition replica
dsquery * "DC=ForestDNSZones,dc=forestRootDomain
Add a CNAME record to DNS
dnscmd %server% /recordadd %zone% %AliasName% CNAME %HostnameAliasing%
Query zone resource records on a Microsoft DNS server
wmic /namespace:\\root\microsoftdns /node:%server% path MicrosoftDNS_ResourceRecord WHERE ContainerName='%zone_name%'
nslookup with debug information
nslookup -debug %IP%
DSQuery authorised DHCP Servers
Dsquery * "cn=NetServices,cn=Services,cn=Configuration, DC=forestRootDomain" -attr dhcpServers
Enumerate all records from a DNS zone
dnscmd /enumrecords @ /additional /continue > DNS_all.txt
Lookup SRV records from DNS
nslookup -type=srv _ldap._tcp.dc._msdcs.{domainRoot}
DNS Information
for /f %i in ('dsquery server -domain %userdnsdomain% -o rdn') do dnscmd %i /info
DNS Zone Detailed information
dnscmd /zoneinfo %userdnsdomain%
DNS Zones in AD
for /f %i in ('dsquery server -o rdn') do Dsquery * -s %i domainroot -filter (objectCategory=dnsZone)
Enumerate DNS Server Zones
for /f %i in ('dsquery server -o rdn') do dnscmd %i /enumzones
Print DNS Zones
dnscmd DNSServer /zoneprint DNSZone
Add a host record in DNS
dnscmd %dnsserver% /recordadd %zone% %relative_name% A %ip%
Find aging records from an enumerated zone
find /i "aging:" DNS_all.txt > DNS_aging.txt
DNS Scavenging check, based on the output of aging records from dnscmd.exe
cscript DNSScavengeTest.wsf /f:DNS_aging.txt
Query DNS objects from the directory
dsquery * DC=,CN=MicrosoftDNS,cn=System,dc=
Start DNS scavenging
dnsmd /startscavenging
Delete a host record from DNS
dnscmd %server% /recorddelete %zone% @ A %IP%
Determine the DNS suffix search list set through policy for a computer
reg query "\\%Computer%\HKEY_LOCAL_MACHINE\software\policies\microsoft\Windows NT\DNSClient" /v SearchList
Query for the zones hosted on a Microsoft DNS server
wmic /namespace:\\root\microsoftdns /node:%server% path MicrosoftDNS_Zone
Find DNS Forwarder information from dnscmd output
for %b in (DNS*.txt) do @for /f "skip=2 delims=[]" %i in ('"find /i /N "Forwarders:" %b"') do @for /f "skip=2 delims=[]" %m in ('"find /i /N "Command completed successfully." %b"') do @for /f %p in ('set /a %m-%i') do echo tail -%p %b
List primary reverse lookup zones from a DNS server
dnscmd %server% /EnumZones /secondary /reverse
List allowed secondary servers for the specified zone
dnscmd %server /zoneinfo %ip%.in-addr.arpa SecondaryServers
Source
dsquery * "DC=ForestDNSZones,dc=forestRootDomain
Add a CNAME record to DNS
dnscmd %server% /recordadd %zone% %AliasName% CNAME %HostnameAliasing%
Query zone resource records on a Microsoft DNS server
wmic /namespace:\\root\microsoftdns /node:%server% path MicrosoftDNS_ResourceRecord WHERE ContainerName='%zone_name%'
nslookup with debug information
nslookup -debug %IP%
DSQuery authorised DHCP Servers
Dsquery * "cn=NetServices,cn=Services,cn=Configuration, DC=forestRootDomain" -attr dhcpServers
Enumerate all records from a DNS zone
dnscmd /enumrecords @ /additional /continue > DNS_all.txt
Lookup SRV records from DNS
nslookup -type=srv _ldap._tcp.dc._msdcs.{domainRoot}
DNS Information
for /f %i in ('dsquery server -domain %userdnsdomain% -o rdn') do dnscmd %i /info
DNS Zone Detailed information
dnscmd /zoneinfo %userdnsdomain%
DNS Zones in AD
for /f %i in ('dsquery server -o rdn') do Dsquery * -s %i domainroot -filter (objectCategory=dnsZone)
Enumerate DNS Server Zones
for /f %i in ('dsquery server -o rdn') do dnscmd %i /enumzones
Print DNS Zones
dnscmd DNSServer /zoneprint DNSZone
Add a host record in DNS
dnscmd %dnsserver% /recordadd %zone% %relative_name% A %ip%
Find aging records from an enumerated zone
find /i "aging:" DNS_all.txt > DNS_aging.txt
DNS Scavenging check, based on the output of aging records from dnscmd.exe
cscript DNSScavengeTest.wsf /f:DNS_aging.txt
Query DNS objects from the directory
dsquery * DC=,CN=MicrosoftDNS,cn=System,dc=
Start DNS scavenging
dnsmd /startscavenging
Delete a host record from DNS
dnscmd %server% /recorddelete %zone% @ A %IP%
Determine the DNS suffix search list set through policy for a computer
reg query "\\%Computer%\HKEY_LOCAL_MACHINE\software\policies\microsoft\Windows NT\DNSClient" /v SearchList
Query for the zones hosted on a Microsoft DNS server
wmic /namespace:\\root\microsoftdns /node:%server% path MicrosoftDNS_Zone
Find DNS Forwarder information from dnscmd output
for %b in (DNS*.txt) do @for /f "skip=2 delims=[]" %i in ('"find /i /N "Forwarders:" %b"') do @for /f "skip=2 delims=[]" %m in ('"find /i /N "Command completed successfully." %b"') do @for /f %p in ('set /a %m-%i') do echo tail -%p %b
List primary reverse lookup zones from a DNS server
dnscmd %server% /EnumZones /secondary /reverse
List allowed secondary servers for the specified zone
dnscmd %server /zoneinfo %ip%.in-addr.arpa SecondaryServers
Source
Wednesday, September 28, 2016
Lync DNS Records
Internal
lyncdiscoverinternal.contoso.com (A record for the Autodiscover
service for internal connections directed to internal Web services)
_sipinternaltls._tcp.contoso.com
(SRV record for internal TLS connections)
_sipinternal._tcp.contoso.com (SRV record for internal TCP connections)
sipinternal.contoso.com (A record for the Front End pool)
Extarnal
lyncdiscover.contoso.com (A record for the Autodiscover service for external Web services)
_sip._tls.contoso.com (SRV record for external TCP connections)
sip.contoso.com (A record for the Front End pool when the client is on the internal network; A record for the Access Edge Server when the client is external with no VPN access)
sipexternal.contoso.com (A record for the Access Edge Server when the client is external with no VPN access)
Friday, August 12, 2016
Lync Dns records
Internal
lyncdiscoverinternal.contoso.com (A record for the
Autodiscover service for internal connections directed to internal Web
services)
_sipinternaltls._tcp.contoso.com (SRV record for internal
TLS connections)
_sipinternal._tcp.contoso.com (SRV record for internal TCP
connections)
sipinternal.contoso.com (A record for the Front End pool)
Extarnal
lyncdiscover.contoso.com (A record for the Autodiscover
service for external Web services)
_sip._tls.contoso.com (SRV record for external TCP
connections)
sip.contoso.com (A record for the Front End pool when the
client is on the internal network; A record for the Access Edge Server when the
client is external with no VPN access)
sipexternal.contoso.com (A record for the Access Edge Server
when the client is external with no VPN access)
Thursday, July 7, 2016
Add WPAD to DNS server, Proxy server
run in powershell on DNS server (Domain Controller):
dnscmd /config /globalqueryblocklist wpad
or from Regedit:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DNS\ParametersGlobalQueryBlockLIst add wpad to value data.
Add WPAD to DNS server, Proxy server
run in powershell on DNS server (Domain Controller):
dnscmd /config /globalqueryblocklist wpad
or from Regedit:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DNS\ParametersGlobalQueryBlockLIst remove wpad
Wednesday, January 13, 2016
ADD A record to DNS Server
Import-Module DNSShell
$dns="dns server ip"
$zone="test.com
Import-Csv C:\tmp\import.csv
| foreach {
dnscmd $dns /recordadd $zone
$($_.name) A $($_.ip)
}
Subscribe to:
Posts (Atom)