< Back

Search-Dns

Wed Jan 15, 2020 2:16 am

NAME Search-Dns



SYNOPSIS

Search all name servers for a specific record.





SYNTAX

Search-Dns [-Name] <String> [-ZoneName] <String> [[-RecordType] {EMPTY | A | NS | MD | MF | CNAME | SOA | MB | MG

| MR | NULL | WKS | PTR | HINFO | MINFO | MX | TXT | RP | AFSDB | X25 | ISDN | RT | NSAP | NSAPPTR | SIG | KEY |

PX | GPOS | AAAA | LOC | NXT | EID | NIMLOC | SRV | ATMA | NAPTR | KX | CERT | A6 | DNAME | SINK | OPT | APL | DS

| SSHFP | IPSECKEY | RRSIG | NSEC | DNSKEY | DHCID | NSEC3 | NSEC3PARAM | TLSA | SMIMEA | HIP | NINFO | RKEY |

TALINK | CDS | CDNSKEY | OPENPGPKEY | CSYNC | ZONEMD | SPF | UINFO | UID | GID | UNSPEC | NID | L32 | L64 | LP |

EUI48 | EUI64 | TKEY | TSIG | IXFR | AXFR | MAILB | MAILA | ANY | URI | CAA | AVC | DOA | AMTRELAY | TA | DLV |

WINS | WINSR | UNKNOWN}] [-DnsSec] [-Tcp] [-Port <UInt16>] [-Timeout <Byte>] [-IPv6] [-ComputerName <String>]

[<CommonParameters>]





DESCRIPTION

Search-Dns may be used to retrieve a resource record from all name servers for a given domain.





PARAMETERS

-Name <String>

The name of the record to search for. The name can either be fully-qualified or relative to the zone name.



Required? true

Position? 2

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-ZoneName <String>

The zone name is used to ensure the correct zone is searched for records. This avoids the need for tricks to

discover the authority for record types such as CNAME.



Required? true

Position? 3

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-RecordType

The record type to search for.



Required? false

Position? 4

Default value ANY

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-DnsSec [<SwitchParameter>]

Advertise support for DNSSEC when executing a query.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Tcp [<SwitchParameter>]

Recursive, or version, queries can be forced to use TCP by setting the TCP switch parameter.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Port <UInt16>

By default, DNS uses TCP or UDP port 53. The port used to send queries may be changed if a server is listening

on a different port.



Required? false

Position? named

Default value 53

Accept pipeline input? false

Accept wildcard characters? false



-Timeout <Byte>

By default, queries will timeout after 5 seconds. The value may be set between 1 and 30 seconds.



Required? false

Position? named

Default value 5

Accept pipeline input? false

Accept wildcard characters? false



-IPv6 [<SwitchParameter>]

Force the use of IPv6 for queries, if this parameter is set and the ComputerName is set to a name (e.g.

ns1.domain.example), Get-Dns will attempt to locate an AAAA record for the server.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-ComputerName <String>

A server name or IP address to execute a query against. If an IPv6 address is used Get-Dns will attempt the

query using IPv6 (enables the IPv6 parameter).



If a name is used another lookup will be required to resolve the name to an IP. Get-Dns caches responses for

queries performed involving the Server parameter. The cache may be viewed and maintained using the

*-InternalDnsCache CmdLets.



If no server name is defined, the Get-DnsServerList command is used to discover locally configured DNS servers.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS





RELATED LINKS