Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 388239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:45:01+00:00 2026-05-12T15:45:01+00:00

I am using WMI to detect a number of items about a network adapter’s

  • 0

I am using WMI to detect a number of items about a network adapter’s state. Among the things I need to find out are (a) speed and (b) duplex.

I have been able to detect the speed of a network adapter by using WMI and the following Python code:

from pycom.client import wmi

dev_name = r"\\DEVICE\\{287EB4BB-5C2A-4108-B377-15E1D0B0E760}"
query1 = """
SELECT * 
FROM  MSNdis_EnumerateAdapter
WHERE DeviceName = '%s'""" % dev_name


wmi_ndis = wmi.WMI("root\\WMI")
results = wmi_ndis.ExecQuery(query1)
instance_name = results[0].InstanceName

del results

query2="""
SELECT * 
FROM MSNdis_LinkSpeed
WHERE InstanceName='%s'""" % instance_name
results = wmi_ndis.ExecQuery(query2)
linkspeed = results[0].NdisLinkSpeed

del results

print instance_name, linkspeed

del instance_name
del linkspeed
del wmi_ndis

There appears to be a perfect class for the data I want: MSNDis_LinkParameters. However, this table does not appear to be populated. There are values in Win32_NetworkAdapter as well, but they are also not populated.

I would be happy to use a native C API or WMI, but I can’t do screen scraping because the application needs to work with arbitrary languages. Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T15:45:01+00:00Added an answer on May 12, 2026 at 3:45 pm

    Apparently the underlying issue here is that WMI provider implementation is handled by the NIC vendor, not the OS– so some NICs may support some settings while (as you’ve discovered) others don’t.

    For link speed, check out this for some WMI scripts which may work on most NICs.

    For duplex, I think you’re out of luck, at least according to topic. Look at the last post in that thread– it seems pretty specific about how to work around the limit in some cases, but won’t work for all NICs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How to detect network drive mount event using wmi ? I'm mainly interested i
How do we find the serial number of a USB drive without using WMI
I need to start a Visual Basic script file by using WMI in a
I'm trying to detect either by calling an API or using WMI whether a
Is there anyway using WMI/.Net to grab monitor information such as Manufacturer, Serial Number,
I have read this article about using WMI to change the settings of NICs
I'm using WMI for querying devices. I need to update UI when new device
How do I get the BIOS serial number without using WMI API under Win32?
I'm using WMI, I need to get some information, but when class is not
How would one go about using WMI to start, stop, and query services on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.