Get-HcsDnsClientServerAddress
Get-HcsDnsClientServerAddress
Gets the server addresses that a Domain Name System (DNS) client device is configured to use.
Syntax
Get-HcsDnsClientServerAddress [ <CommonParameters>]
Detailed Description
The Get-HcsDnsClientServerAddress cmdlet gets the server addresses that a DNS client device is configured to use.
Parameters
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Microsoft.HCS.Management.Powershell.Cmdlets.DnsInfo
The return object has four properties:
-- Primary DNS address (an IPAddress)
-- Secondary DNS addresses (an array of IPAddress)The DnsInfo object has the following properties:
-- DnsInfo: PrimaryIPv4 = platInfo.PrimaryIPv4; PrimaryIPv6 = platInfo.PrimaryIPv6; SecondaryIPv4 = platInfo.SecondaryIPv4.ToArray();SecondaryIPv6 = platInfo.SecondaryIPv6.ToArray();
-- IPAddress PrimaryIPv4
-- IPAddress PrimaryIPv6
-- IPAddress[] SecondaryIPv4
-- IPAddress[] SecondaryIPv6
Examples
Example 1: Get the server addresses of a DNS client
This command gets the server addresses of a DNS client.
PS C:\> Get-HcsDnsClientServerAddress