Module for configuring DNS Client on Windows systems
Add the DNS server to the network interface (index starts from 1)
Note: if the interface DNS is configured by DHCP, all the DNS servers will be removed from the interface and the requested DNS will be the only one
CLI Example:
salt '*' win_dns_client.add_dns <ip> <interface> <index>
Configure the interface to get its DNS servers from the DHCP server
CLI Example:
salt '*' win_dns_client.dns_dhcp <interface>
Get the type of DNS configuration (dhcp / static).
interface (str) -- The name of the network interface. This is the
in the Network Connection Details for the device (Description) --
True if DNS is configured, otherwise False
CLI Example:
salt '*' win_dns_client.get_dns_config 'Local Area Connection'
Return a list of the configured DNS servers of the specified interface
interface (str) -- The name of the network interface. This is the name as
appears in the Control Panel under Network Connections (it) --
A list of dns servers
CLI Example:
salt '*' win_dns_client.get_dns_servers 'Local Area Connection'
Remove the DNS server from the network interface
CLI Example:
salt '*' win_dns_client.rm_dns <ip> <interface>
© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/modules/all/salt.modules.win_dns_client.html