I was wondering if there is a WMI class that will allow you to change the
speed and duplex settings for any network card. We're moving to VOIP and
need to make sure that all of the client machines are set to Auto. Thanks!
I once used the script below to change the network settings to 100/Half. The
setting, 3 in this case, was found by manually changing it and then checking
the registry entry. The text string was similarly found by examining the
registry - fortunately we buy batches of PCs and there weren't many
different types of NIC. It doesn't use WMI but might be of some use...
On Error Resume Next
Set shell = CreateObject("wscript.shell")
Dim strRegKey, strregVal, strDone
strDone = "No"
for i = 1 to 20
strRegVal = ""
strRegKey =
"HKLM\System\CurrentControlSet\Control\Class\{4d36E972-E325-11CE-BFC1-08002bE10318}\000"
& i
strRegVal = shell.RegRead(strRegKey & "\DriverDesc")
if strRegVal = "" then
i = 1000
else
Select Case strRegVal
Case "Intel(R) PRO/100 VM Network Connection"
shell.RegWrite strRegKey & "\SpeedDuplex", 3
strDone = "Yes"
Case "Intel(R) PRO/100 VE Network Connection"
shell.RegWrite strRegKey & "\SpeedDuplex", 3
strDone = "Yes"
Case "Intel(R) PRO/1000 MT Network Connection"
shell.RegWrite strRegKey & "\SpeedDuplex", 3
strDone = "Yes"
End Select
end if
next
if strDone = "Yes" then
msgbox "Your network adapter has been set to 100 Mbps Half duplex."
else
msgbox "Unable to set network adapter speed."
end if
For how to deal with other (more) card-types:
http://www.petri.co.il/forums/showthread.php?t=14875
\Rems