- January 23, 2016 at 8:21 am #34217
Has any successfully used xDnsServerAddress from the xNetworking resource? I believe I've got my configuration correct, but it doesn't change the setting. It also doesn't throw any errors. Below are the results from the test and set for the resource and the config.
VERBOSE: [ZDC01]: [[xDNSServerAddress]DnsServerAddress] Test-TargetResource: Checking the DNS Server Addresses. VERBOSE: [ZDC01]: [[xDNSServerAddress]DnsServerAddress] Test-TargetResource: DNS Servers are not correct. Expected "System.String", actual "System.String ". VERBOSE: [ZDC01]: LCM: [ End Test ] [[xDNSServerAddress]DnsServerAddress] in 0.6880 seconds. VERBOSE: [ZDC01]: LCM: [ Start Set ] [[xDNSServerAddress]DnsServerAddress] VERBOSE: [ZDC01]: [[xDNSServerAddress]DnsServerAddress] Set-TargetResource: Applying the DNS Server Addresses. VERBOSE: [ZDC01]: [[xDNSServerAddress]DnsServerAddress] Set-TargetResource: DNS Servers are already set correctly. VERBOSE: [ZDC01]: LCM: [ End Set ] [[xDNSServerAddress]DnsServerAddress] in 0.0780 seconds.January 25, 2016 at 12:10 pm #34266
I think it wants an array of strings.January 28, 2016 at 2:05 pm #34483
I'll try inserting that instead and see what happens, I got it to work just fine with cNetworking. Appreciate the reply thank you.January 28, 2016 at 5:40 pm #34500
I have it working just fine with an array of strings, but you're not the first to modify xNetworking and replace it with cNetworking. I've made a custom module on more than one occasion for clients because the IP address is an "add" and not a "replace" (NIC will end up with two IPs if a differing fixed IP is already present).
Keep telling myself I'll fork and try to commit back to github but never got around to it. Just add an optional "replace" parameter to let you change the behavior.January 29, 2016 at 5:46 am #34543
Thank you both for the responses, Don was right it needed an array of strings not just a string or an object. Something that should also be looked at, time to learn more about Github and pull requests 🙂 I got it working by replacing my configdata with the below.
You must be logged in to reply to this topic.