< Back

Get-DnsServerList

Wed Jan 15, 2020 2:11 am

NAME Get-DnsServerList



SYNOPSIS

Gets a list of network interfaces and attempts to return a list of DNS server IP addresses.





SYNTAX

Get-DnsServerList [-IPv6] [<CommonParameters>]





DESCRIPTION

Get-DnsServerList uses System.Net.NetworkInformation to return a list of operational ethernet or wireless

interfaces. IP properties are returned, and an attempt to return a list of DNS server addresses is made. If

successful, the DNS server list is returned.





PARAMETERS

-IPv6 [<SwitchParameter>]

Find DNS servers which support IPv6.



Required? false

Position? named

Default value False

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

System.Net.IPAddress





-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-DnsServerList













-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-DnsServerList -IPv6















RELATED LINKS