Powershell DSC error – No matching MSFT_DNSClientServerAddress objects found by CIM query for instances of the ROOT/StandardCimv2/MSFT_DNSClientServerAddress class on the CIM server

Powershell DSC error – No matching MSFT_DNSClientServerAddress objects found by CIM query for instances of the ROOT/StandardCimv2/MSFT_DNSClientServerAddress class on the CIM server

 

Background –  I was trying to deploy azure dsc extension to add ADDS role on new azure vm using ARM template (extension resource under compute resource).

Extension – active-directory-new-domain-ha-2-dc and AD

Error – 

{ “status”: “Failed”, “error”: { “code”: “ResourceDeploymentFailure”, “message”: “The resource operation completed with terminal provisioning state ‘Failed’.”, “details”: [ { “code”: “VMExtensionProvisioningError”, “message”: “VM has reported a failure when processing extension ‘CreateADForest’. Error message: “DSC Configuration ‘CreateADPDC’ completed with error(s). Following are the first few: Interface “Ethernet” is not available. Please select a valid interface and try again. PowerShell DSC resource MSFT_xDNSServerAddress failed to execute Test-TargetResource functionality with error message: The running command stopped because the preference variable “ErrorActionPreference” or common parameter is set to Stop: No matching MSFT_DNSClientServerAddress objects found by CIM query for instances of the ROOT/StandardCimv2/MSFT_DNSClientServerAddress class on the CIM server: SELECT * FROM MSFT_DNSClientServerAddress WHERE ((InterfaceAlias LIKE ‘Ethernet’)) AND ((AddressFamily = 2)). Verify query parameters and retry. The SendConfigurationApply function did not succeed.”.” } ] } }

 

Solution – 

As per the error the InterfaceAlias  in not there with name “Ethernet” since now a days azure provision VM with default network interface name “Ethernet 2” and “Ethernet” is the name hard coded in the DSC extension ***.ps1 file so just changing the hardcoded value to “Ethernet 2” resolved the issue.

 

 

(Visited 13 times, 1 visits today)

Add a Comment

Facebook