none
Is Multiple adapter namespace instance usage possible? RRS feed

  • Question

  • Hi,

    We are having a situation in porting our Operating system from windows7 to windows10. For namespace previously we were using root\\cimv2 for win32_netadapter and win32_netadapterconfiguration, but now since win32_netadapter is deprecated and replaced by msft_netadapter with new namespace as root\\standardcimv2, is it okay to use root\\standardcimv2 with win32_netadapterconfiguration or should i create a new instance with root\\cimv2 for using the later one.

    Is win32_netadapterconfiguration supported in root\\standardcimv2? if supported i am unable to retrive "IPEnabled" property as before. Please let me know your suggestions.

    Thanks and regards,

    Herokiller

    • Moved by jrv Tuesday, October 24, 2017 6:44 AM not relevant
    Monday, October 23, 2017 1:11 PM

All replies

  • Where did you get the idea that Win32_NetworkAdapter was not available.  It works just fine on W10.

    It is in the default namespace which is root\CimV2

    It works just fine on Windows 10:

    PS D:\scripts> Get-WmiObject Win32_NetworkAdapterConfiguration -Filter 'IpEnabled=True'
    
    
    DHCPEnabled      : True
    IPAddress        : {3333, cccccc, dddd,     
    DefaultIPGateway : {10.0.0.1, fe80::}
    DNSDomain        : test.net
    ServiceName      : Netwtw04
    Description      : Intel(R) Dual Band Wireless-AC 7265
    Index            : 2
    


    \_(ツ)_/


    Monday, October 23, 2017 1:24 PM
  • Don't use double slashes outside of a query. Parameters do no like them.


    \_(ツ)_/

    Monday, October 23, 2017 1:30 PM
  • Hi Jrv,

    Thanks for your reply.

    May be i stated in a different way. My question is like can two namespaces coexist or is win32_networkadapterconfiguration is supported in root\standardcimv2 in windows10?

    win32_netadapter is deprecated as per the below microsoft link

    https://msdn.microsoft.com/en-us/library/aa394216(v=vs.85).aspx

    :)


    Tuesday, October 24, 2017 5:42 AM
  • There are many namespaces in WMI.  Both of those namespaces exist and will for some time.

    Only one class (Win32_NetworkAdapter) has been marked as "deprecated".


    \_(ツ)_/

    Tuesday, October 24, 2017 5:45 AM
  • i can understand that both the namespaces exist but can they coexist in a single thread is what my question?


    Tuesday, October 24, 2017 6:28 AM
  • If you area asking how to use these in a compiled program then you will need to ask in the developers forum.

    If you area asking how to query a class in a namespace then you will need to supply a sample of the script you are trying to use and state what is not happening or what error you are receiving.

    Note that PowerShell only has one thread.  We can make as many WMI calls as we want in PowerShell.


    \_(ツ)_/

    Tuesday, October 24, 2017 6:34 AM
  • Ohh. my bad. I am sorry. that means my post is not relevant here. Thanks for your quick response jrv.

    :)

    Tuesday, October 24, 2017 6:39 AM
  • Hi,

    I'm checking how the issue is going, was your issue resolved?

    And if the replies as above are helpful, we would appreciate you to mark them as answers, and if you resolve it using your own solution, please share your experience and solution here. It will be greatly helpful to others who have the same question.

    Appreciate for your feedback.

    Best Regards,
    Albert Ling


    Please remember to mark the replies as an answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, October 27, 2017 9:14 AM