strNameSpace = "winmgmts:{impersonationLevel=impersonate}//./root/cimv2"
strQuery = "SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True"
Set colAdapters = GetObject(strNameSpace). ExecQuery(strQuery)
For Each objAdapter in colAdapters
strMAC = LCase(Replace(objAdapter.MACAddress,":","-"))
Text = Text & "MAC адрес: " & strMAC & VbCrLf
Next
' WScript.Echo Text
Комментариев нет:
Отправить комментарий