def get_dns_config(interface='Local Area Connection'):
 interface = interface.split('\\')
 interface = ''.join(interface)
 with salt.utils.winapi.Com():
  c = wmi.WMI()
  for iface in c.Win32_NetworkAdapterConfiguration(IPEnabled=1):
   if (interface == iface.Description):
    return iface.DHCPEnabled

def get_dns_config ( interface = 'Local Area Connection' ) : interface = interface . split ( '\\' ) interface = '' . join ( interface ) with salt . utils . winapi . Com ( ) : c = wmi . WMI ( ) for iface in c . Win32_NetworkAdapterConfiguration ( IPEnabled = 1 ) : if ( interface == iface . Description ) : return iface . DHCPEnabled
get the type of dns configuration cli example: .