[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1018
  • Last Modified:

Remotely obtaining configured nic speed.

Hi Guys,

I am looking for a way to remotely find out what a number of Windows XP devices have their nic negotiated speeds configured to.

For example 100 full duplex or Auto.

All devices are connected to a Windows 2003 Server active directory domain. I will also settle for the  command line to get this information for the local pc so that I can build on that.

Thanks
0
CharlWiehahn
Asked:
CharlWiehahn
  • 3
  • 2
1 Solution
 
neothwinCommented:
for speed:
Fpr winVista or later, you can use speed property of Win32_NetworkAdapter wmi class.

http://msdn.microsoft.com/en-us/library/aa394216(VS.85).aspx
Speed
Data type: uint64
Access type: Read-only

Estimate of the current bandwidth in bits per second. For endpoints which vary in bandwidth or for those where no accurate estimation can be made, this property should contain the nominal bandwidth. This property is inherited from CIM_NetworkAdapter.

Windows Server 2003, Windows XP, Windows 2000, and Windows NT 4.0:  This property has not been implemented yet. It returns a NULL value by default.


Here is an example using wmic
C:\>wmic nic where "speed is not null and netConnectionStatus is not null" get /value



For WinXP, you can use MSNdis_LinkSpeed wmi class.
e.g with wmic.
C:\>wmic /namespace:\\root\wmi path MSNdis_LinkSpeed where "InstanceName='Intel(
R) 82579LM Gigabit Network Connection'" get /value
Active=TRUE
InstanceName=Intel(R) 82579LM Gigabit Network Connection
NdisLinkSpeed=1000000


rgds,
0
 
neothwinCommented:
for Duplex/auto, pls use MSNdis_MacOptions class.

pls check the following link
http://www.experts-exchange.com/Networking/Misc/Q_21037332.html
0
 
CharlWiehahnAuthor Commented:
HI neothwin,

I have tested both scripts and it seems that WMI is unable to obtain the duplex settings. For the first script the output look like this when Duplex on the nic is set to Auto
-----------------------------------
Active=TRUE
InstanceName=Intel(R) 82567LM-3 Gigabit Network Connection
NdisLinkSpeed=1000000
-----------------------------------

and the output for duplex set to 100 Full
----------------------------------
Active=TRUE
InstanceName=Intel(R) 82567LM-3 Gigabit Network Connection
NdisLinkSpeed=1000000
----------------------------------


And for the second script with the duplex setting to Auto the output looks like:
----------------------------------
Localhost, Intel(R) 82567LM-3 Gigabit Network Connection, 100
----------------------------------

and for 100 Full it looks like:
----------------------------------
Localhost, Intel(R) 82567LM-3 Gigabit Network Connection, 100
----------------------------------


As you can see there is no way to differenciate between the 2 settings using the scripts supplied. The Guru on the second link also confirmed that he could not get the duplex part of the script working

----------------------------------------------
graye:
I couldn't get the duplex thing to work
----------------------------------------------


Any further advice would really be appreciated. :)
0
 
neothwinCommented:
I think the getting duplex info is not so easy :)
pls check this.
http://social.technet.microsoft.com/Forums/en-NZ/ITCG/thread/9446bf15-bdbd-470c-a04c-11f2f4e1d9f3
0
 
CharlWiehahnAuthor Commented:
Hi neothwin,

This last link that you provided me allowed me to find the Windows registry value that gets updated when the duplex setting changes. I quickly knocked an AutoIT script together that queries a few hundred pc's on the network and reads the specific key / Value.

Thanks again.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now