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
Details of the scenario you tried and the problem that is occurring
Trying to set IPv4 address on network adapter that currently only has IPv6. But that fails because DSC_IPAddress checks for "AddressFamily = 2" being set on the adapter, and refuses to proceed if that's not the case.
My manual workaround is to log in to the server and run the following:
After that, the DSC configuration will push properly. But I don't know how (idiomatically) to create the configuration that says "I know this adapter doesn't have an IPv4 address, but I'd like you to create one."
Note: issue #417 "Can't test a configuration that depends on Rename-NetAdapter" may be a related issue, in which @johlju mentions that neither Get-TargetResource nor Set-TargetResource should throw an error if the adapter does not exist yet.
Verbose logs showing the problem
[[IPAddress]IpAddressEthernet19f309ccb-69ce-427a-8374-e989113c1db3::[IpConfiguration]IpConfiguration] Importing the module DSC_IPAddress in force
mode.
VERBOSE: [TARGETSERVER]:
[[IPAddress]IpAddressEthernet19f309ccb-69ce-427a-8374-e989113c1db3::[IpConfiguration]IpConfiguration] Set-TargetResource: Applying the IP Address.
VERBOSE: [TARGETSERVER]: LCM: [ End Set ]
[[IPAddress]IpAddressEthernet19f309ccb-69ce-427a-8374-e989113c1db3::[IpConfiguration]IpConfiguration] in 0.1880 seconds.
PowerShell DSC resource DSC_IPAddress 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: No matching MSFT_NetIPAddress objects found by CIM query for
instances of the ROOT/StandardCimv2/MSFT_NetIPAddress class on the CIM server: SELECT * FROM MSFT_NetIPAddress WHERE ((InterfaceAlias LIKE
'Ethernet1')) AND ((AddressFamily = 2)). Verify query parameters and retry.
+ CategoryInfo : InvalidOperation: (:) [], CimException
Suggested solution to the issue
The DSC configuration that is used to reproduce the issue (as detailed as possible)
Where adapter Ethernet1 only has a default IPv6 address, and I want to put an IPv4 address on it, I try:
Details of the scenario you tried and the problem that is occurring
Trying to set IPv4 address on network adapter that currently only has IPv6. But that fails because DSC_IPAddress checks for "AddressFamily = 2" being set on the adapter, and refuses to proceed if that's not the case.
My manual workaround is to log in to the server and run the following:
After that, the DSC configuration will push properly. But I don't know how (idiomatically) to create the configuration that says "I know this adapter doesn't have an IPv4 address, but I'd like you to create one."
Note: issue #417 "Can't test a configuration that depends on Rename-NetAdapter" may be a related issue, in which @johlju mentions that neither Get-TargetResource nor Set-TargetResource should throw an error if the adapter does not exist yet.
Verbose logs showing the problem
Suggested solution to the issue
The DSC configuration that is used to reproduce the issue (as detailed as possible)
Where adapter Ethernet1 only has a default IPv6 address, and I want to put an IPv4 address on it, I try:
The operating system the target node is running
OsName : Microsoft Windows Server 2019 Standard
OsOperatingSystemSKU : StandardServerEdition
OsArchitecture : 64-bit
WindowsVersion : 1809
WindowsBuildLabEx : 17763.1.amd64fre.rs5_release.180914-1434
OsLanguage : en-US
OsMuiLanguages : {en-US}
Version and build of PowerShell the target node is running
Name Value
PSVersion 5.1.17763.1490
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.1490
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Version of the DSC module that was used ('dev' if using current dev branch)
dev
The text was updated successfully, but these errors were encountered: