NetworkAdapterConfiguration.SettingID
(1)
NetworkAdapterConfiguration.Index
(1)
NetworkAdapter
(1)
ResultClass
(1)
CodeProject
(1)
SettingId
(1)
SettignId
(1)
D575CD5E6128
(1)

Whats wrong with this query.....

Asked By kiran
19-Nov-09 05:57 PM
Hi All,

I am trying to use the below query, but every time it fails with a
Invalid object path error.

{Win32_NetworkAdapterConfiguration.SettingID=""{E44212B3-348C-4F4E-8601-
D575CD5E6128}""} WHERE ResultClass=Win32_NetworkAdapter"

I googled  and found out that if the path has '}', then it needs to be
in double double quoted strings. I have tried lots of combinations but
unfortunately could not get it to work.

Thanks,

"kiran" wrote:If you want to use the path to an instance of a WMI class in a

urkec replied to kiran
19-Nov-09 02:09 PM
If you want to use the path to an instance of a WMI class in a query you
need to specify the values of the key properties.
Win32_NetworkAdapterConfiguration key property is Index, not SettingId which
is inherited from CIM_Setting. Here is what the query would look like

Associators Of {Win32_NetworkAdapterConfiguration.Index=1} Where ResultClass
= Win32_NetworkAdapter

Note that there are no spaces in '.Index=1' . I do not know why you are using
the SettignId property, but for that to work you would first need to get a
collection of objects with the specified SettingId value, and get associated
Win32_NetworkAdapter instances for each object in the collection.

--
urkec

My blog:
http://theadminblog.blogspot.com/

My CodeProject articles:
http://www.codeproject.com/script/Articles/MemberArticles.aspx?amid=4210975
Post Question To EggHeadCafe