I have tried to use the Enable() method from Win32_NetworkAdapter and Win32_PnPEntity class. But it only enable or disable the interface.
Set devices = WMIService.ExecQuery("SELECT * FROM Win32_PnPEntity WHERE DeviceID like '" & Replace(adapter.PNPDeviceId, "\", "\\") & "'")
For Each dev In devices
Return_En = dev.Enable()
if Return_En <> 0 Then
Wscript.StdOut.WriteLine "Failed to bring up the interface, error code " & Return_En
End if
I wanted to make the link up or down and not to Disable/Enable. This is a custom feature of a particular NIC card. In simple words, i wanted to control a custom property of a card via VBScript.
Is there a way to control this property from VB script.?