Using Windows Server 2012 R2.
The goal is to set the IPv4 address of a server. As DSC correctly states in the verbose message below, the Expected [ip is] 192.168.0.203, [while the] actual [ip is] 192.168.0.205
The following error message:
Start-DscConfiguration -Path .\BasicServer -Verbose -Wait -Force
VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = SendConfigurationApply,'className' =
MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.
VERBOSE: An LCM method call arrived from computer ComputerName with user sid S-1-5-21-139086020-2308268882-217435134-1104.
VERBOSE: [ComputerName]: LCM: [ Start Set ]
VERBOSE: [ComputerName]: LCM: [ Start Resource ] [[xIPAddress]IPAddress]
VERBOSE: [ComputerName]: LCM: [ Start Test ] [[xIPAddress]IPAddress]
VERBOSE: [ComputerName]: [[xIPAddress]IPAddress] Checking the IPAddress ...
VERBOSE: [ComputerName]: [[xIPAddress]IPAddress] IPAddress not correct. Expected 192.168.0.203, actual 192.168.0.205
VERBOSE: [ComputerName]: LCM: [ End Test ] [[xIPAddress]IPAddress] in 0.0310 seconds.
VERBOSE: [ComputerName]: LCM: [ Start Set ] [[xIPAddress]IPAddress]
VERBOSE: [ComputerName]: [[xIPAddress]IPAddress] Checking the IPAddress ...
VERBOSE: [ComputerName]: [[xIPAddress]IPAddress] IPAddress not correct. Expected 192.168.0.203, actual 192.168.0.205
VERBOSE: [ComputerName]: [[xIPAddress]IPAddress] Setting IPAddress ...
VERBOSE: [ComputerName]: [[xIPAddress]IPAddress] Instance DefaultGateway already exists
VERBOSE: [ComputerName]: LCM: [ End Set ] [[xIPAddress]IPAddress] in 0.0620 seconds.
PowerShell DSC resource MSFT_xIPAddress failed to execute Set-TargetResource functionality with error message: Can not set or find valid IPAddress using
InterfaceAlias Ethernet and AddressFamily IPv4
+ CategoryInfo : InvalidOperation: (:) [], CimException
+ FullyQualifiedErrorId : ProviderOperationExecutionFailure
+ PSComputerName : ComputerName.domain.com
The SendConfigurationApply function did not succeed.
+ CategoryInfo : NotSpecified: (root/Microsoft/...gurationManager:String) [], CimException
+ FullyQualifiedErrorId : MI RESULT 1
+ PSComputerName : ComputerName.domain.com
VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Time taken for configuration job to complete is 0.268 seconds
... is thrown when applying the following xNetworking DSC configuration:
Import-DscResource -Module xNetworking
Node $NodeFQDN {
xIPAddress IPAddress {
InterfaceAlias = "Ethernet"
IPAddress = $IPv4
AddressFamily = "IPV4"
DefaultGateway = '192.168.0.1'
SubnetMask = 24
}}
where $IPv4 = '192.168.0.203'.
I have noticed that the Local Configuration Manager is capable of Test-DSCConfiguration, only unable to apply any IP related changes. I have tested this by running the configuration above on the system while the IP is already correctly set.
The message "Can not set or find valid IPAddress using InterfaceAlias Ethernet and AddressFamily IPv4" is confusing since the LCM has obviously been able to find the the adapter during the Test-DSCConfiguration operation.
Any clues as to why the Local Configuration Manager is unable to apply the configuration? What am I not seeing?