Managing DNS Clients
So far we have seen different DNS sever-related operations in this chapter. As mentioned at the beginning of this chapter, a module is available for managing the client-side operations related to DNS. It can be loaded using the following command:
Import-Module DnsClient
In the previous section, we used the Resolve-Dnsname
cmdlet from this module, which helps in resolving the DNS names. The following are some of the frequent DNS operations that are performed from the client's-side and sample codes:
Get client-side DNS cache. This is equivalent to the ipconfig /displaydns
command in Windows as shown in the following command:
Get-DnsClientCache
The client-side cache can be cleared by using the following command. This is equivalent to the ipconfig /flushdns
command:
Clear-DnsClientCache
The following command displays the DNS servers configured on the LabNet
network interface:
Get-DnsClientServerAddress -InterfaceAlias Labnet -AddressFamily Ipv4
DNS server IP addresses on...