You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have come across unexpected behavior with the xIPAddress resource. It fails when adding multiple addresses if any of the addresses are already present and in the correct state.
PowerShell DSC resource MSFT_xIPAddress failed to execute Set-TargetResource functionality with error message: The running command stopped because the preference
variable "ErrorActionPreference" or common parameter is set to Stop: Instance MSFT_NetIPAddress already exists
It appears that it tries to add the addresses that are already present. You get the same error when running this command under the same circumstances:
I have come across unexpected behavior with the xIPAddress resource. It fails when adding multiple addresses if any of the addresses are already present and in the correct state.
Given the scenario:
And the configuration:
It will fail with the error:
It appears that it tries to add the addresses that are already present. You get the same error when running this command under the same circumstances:
New-NetIPAddress -InterfaceAlias Ethernet -IPAddress 192.168.0.1 -AddressFamily IPv4 -PrefixLength 24 -ErrorAction Stop
I did this repro on a Windows 10 PC:
I also have experienced the issue on a Windows Server 2016 machine:
The text was updated successfully, but these errors were encountered: