-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NetConnectionProfile: does not find the interface (CIM object) #425
Comments
Hi @fullenw1 - can you run: Get-NetConnectionProfile -InterfaceAlias LAN on your target node? What does it return? What does: Get-NetAdapter -Name LAN return? |
PS> Get-NetAdapter -Name LAN
Name InterfaceDescription ifIndex Status MacAddress LinkSpeed
---- -------------------- ------- ------ ---------- ---------
LAN vmxnet3 Ethernet Adapter 5 Up 00-50-56-0A-B1-DA 10 Gbps
PS> Get-NetConnectionProfile -InterfaceAlias LAN
Name : mydomain.com
InterfaceAlias : LAN
InterfaceIndex : 5
NetworkCategory : DomainAuthenticated
IPv4Connectivity : LocalNetwork
IPv6Connectivity : NoTraffic
PS> |
Same issue, running PowerShell 7.2. PS> Get-NetAdapter -Name TL822N
Name InterfaceDescription ifIndex Status
---- -------------------- ------- ------
TL822N TP-Link Wireless USB Adapter #2 12 Up
PS> Set-NetConnectionProfile -InterfaceIndex 12 -IPv6Connectivity Internet RESULT: Set-NetConnectionProfile: No matching MSFT_NetConnectionProfile objects found by CIM query for instances of the root/StandardCimv2/MSFT_NetConnectionProfile class on the CIM server: SELECT * FROM MSFT_NetConnectionProfile WHERE ((InterfaceIndex = 12)) AND ((IPv6Connectivity = 4)). Verify query parameters and retry. This actually caused a problem on a WS I was setting up, because it was connected through a dingy router Speedport W724V. And it had IPv6 enabled on the local LAN. At some point everything network related stopped working on that one workstation. Disabling IPv6 on the adapter, and then re-enabling it helped. Don't know if it's a repeatable issue though, or just a random error. |
@mormy - it is possible that if IPv6 on the adapter wasn't working properly that the CIM object for the MSFT_NetConnectionProfile for IPv6 on the adapter wasn't available for a short period (or was still being enabled). But without going into adapter/OS diagnostics, might treat this as an OS/driver/Networking issue. But if you can repeat it we could look at other ways to work around it? |
Yeah, forgot to mention, tried it on 2 different OS-es on 2 different machines (one is Ryzen 5 5600 / B450 platform running Win 11 & PowerShell 5.n + 7.2, one is Intel i3 7300t Dell something or other SFF running Win 10 / PWSH 5). It seems to me as if the mapping from the list of options supplied to the parameter -IPv6Connectivity to expected values from 0 - 4 is somehow bugged. Does it expect a different form of input than just a regular string, a number, quoted, non-quoted. (I've tried them all, same result) To my understanding, that parameter should say use IPv4/6 only for some traffic. For example, use IPv4 for the totality of local, and IPv6 can go outside and play. Just confirmed, change doesn't work for -IPv4Connectivity either PS C:\Users\marin> Set-NetConnectionProfile -InterfaceIndex 12 -IPv4Connectivity 4
PS C:\Users\marin> Set-NetConnectionProfile -InterfaceIndex 12 -IPv4Connectivity 3
Set-NetConnectionProfile: No matching MSFT_NetConnectionProfile objects found by CIM query for instances of the
root/StandardCimv2/MSFT_NetConnectionProfile class on the CIM server:
SELECT * FROM MSFT_NetConnectionProfile WHERE ((InterfaceIndex = 12)) AND ((IPv4Connectivity = 3)).
Verify query parameters and retry.
PS C:\Users\marin> Set-NetConnectionProfile -InterfaceIndex 12 -IPv4Connectivity 4
PS C:\Users\marin> Get-NetConnectionProfile
Name : marin.wlan
InterfaceAlias : TL822N
InterfaceIndex : 12
NetworkCategory : Private
IPv4Connectivity : Internet
IPv6Connectivity : NoTraffic
PS C:\Users\marin> Set-NetConnectionProfile -InterfaceIndex 12 -IPv6Connectivity 4
Set-NetConnectionProfile: No matching MSFT_NetConnectionProfile objects found by CIM query for instances of the
root/StandardCimv2/MSFT_NetConnectionProfile class on the CIM server:
SELECT * FROM MSFT_NetConnectionProfile WHERE ((InterfaceIndex = 12)) AND ((IPv6Connectivity = 4)).
Verify query parameters and retry.
PS C:\Users\marin> Set-NetConnectionProfile -InterfaceIndex 12 -IPv6Connectivity 2
Set-NetConnectionProfile: No matching MSFT_NetConnectionProfile objects found by CIM query for instances of the
root/StandardCimv2/MSFT_NetConnectionProfile class on the CIM server:
SELECT * FROM MSFT_NetConnectionProfile WHERE ((InterfaceIndex = 12)) AND ((IPv6Connectivity = 2)).
Verify query parameters and retry.
PS C:\Users\marin> Set-NetConnectionProfile -InterfaceIndex 12 -IPv6Connectivity 'Subnet'
Set-NetConnectionProfile: No matching MSFT_NetConnectionProfile objects found by CIM query for instances of the
root/StandardCimv2/MSFT_NetConnectionProfile class on the CIM server:
SELECT * FROM MSFT_NetConnectionProfile WHERE ((InterfaceIndex = 12)) AND ((IPv6Connectivity = 2)).
Verify query parameters and retry.
PS C:\Users\marin> Set-NetConnectionProfile -InterfaceIndex 12 -IPv6Connectivity 3
Set-NetConnectionProfile: No matching MSFT_NetConnectionProfile objects found by CIM query for instances of the
root/StandardCimv2/MSFT_NetConnectionProfile class on the CIM server:
SELECT * FROM MSFT_NetConnectionProfile WHERE ((InterfaceIndex = 12)) AND ((IPv6Connectivity = 3)).
Verify query parameters and retry.
PS C:\Users\marin> Set-NetConnectionProfile -InterfaceIndex 12 -IPv6Connectivity 1
PS C:\Users\marin> Get-NetConnectionProfile
Name : marin.wlan
InterfaceAlias : TL822N
InterfaceIndex : 12
NetworkCategory : Private
IPv4Connectivity : Internet
IPv6Connectivity : NoTraffic
PS> Set-NetConnectionProfile -InterfaceIndex 12 -IPv6Connectivity 2
Set-NetConnectionProfile: No matching MSFT_NetConnectionProfile objects found by CIM query for instances of the
root/StandardCimv2/MSFT_NetConnectionProfile class on the CIM server:
SELECT * FROM MSFT_NetConnectionProfile WHERE ((InterfaceIndex = 12)) AND ((IPv6Connectivity = 2)).
Verify query parameters and retry.
PS> Set-NetConnectionProfile -InterfaceIndex 12 -IPv4Connectivity 1
Set-NetConnectionProfile: No matching MSFT_NetConnectionProfile objects found by CIM query for instances of the
root/StandardCimv2/MSFT_NetConnectionProfile class on the CIM server:
SELECT * FROM MSFT_NetConnectionProfile WHERE ((InterfaceIndex = 12)) AND ((IPv4Connectivity = 1)). Verify query parameters and retry.
PS> Set-NetConnectionProfile -InterfaceIndex 12 -IPv4Connectivity 4
PS> Get-NetConnectionProfile
Name : marin.wlan
InterfaceAlias : TL822N
InterfaceIndex : 12
NetworkCategory : Private
IPv4Connectivity : Internet
IPv6Connectivity : NoTraffic Obviously this is a bigger issue than just IPv6 changes. |
I can check for eth NICs tomorrow, don't have any wired connections @ home, can check at the office. |
Have had this exact same issue for years on my win2019 servers! Even tried using bing chat this morning to get some insight, but it does not know what *posting my from my little iPhone, not win2019, so may have a typo or misspelling. Will check once i get to work. |
Details of the scenario you tried and the problem that is occurring
I am trying to configure an interface profile to LocalNetwork but the resource does not find the CIM object.
Verbose logs showing the problem
TimeCreated : 23/10/2019 14:39:21
ProviderName : Microsoft-Windows-DSC
Id : 4103
Message : Job {033F100F-F592-11E9-AF98-005056A08475} :
This event indicates that a non-terminating error was thrown when DSCEngine was executing Set-TargetResource on MSFT_NetConnectionProfile DSC resource. FullyQualifiedErrorId is
CmdletizationQuery_NotFound,Set-NetConnectionProfile. Error Message is No matching MSFT_NetConnectionProfile objects found by CIM query for instances of the
root/StandardCimv2/MSFT_NetConnectionProfile class on the CIM server: SELECT * FROM MSFT_NetConnectionProfile WHERE ((InterfaceAlias LIKE 'LAN')) AND ((IPv4Connectivity = 3)) AND
((IPv6Connectivity = 3)). Verify query parameters and retry..
Suggested solution to the issue
So far I understand the error message, the resource is searching for an interface named LAN which has IPv4 and IPv6 set as LocalNetwork.
However, the conectivity type (LocalNetwork) is not the value the resource should be searching for but instead it shoud set it.
Searching an interface named LAN and setting it to LocalNetwork is the goal...
The DSC configuration that is used to reproduce the issue (as detailed as possible)
YAML format for Datum:
NetworkingDsc: NetConnectionProfile: - InterfaceAlias: LAN IPv4Connectivity: LocalNetwork IPv6Connectivity: LocalNetwork NetworkCategory: Private
The operating system the target node is running
OsName : Microsoft Windows Server 2019 Datacenter
OsOperatingSystemSKU : DatacenterServerEdition
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
PSVersion 5.1.17763.316
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.316
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)
Name : NetworkingDsc
Path : C:\Program Files\WindowsPowerShell\Modules\NetworkingDsc\7.4.0.0\NetworkingDsc.psd1
Description : Module with DSC Resources for Networking area
ModuleType : Manifest
Version : 7.4.0.0
The text was updated successfully, but these errors were encountered: