Created
November 4, 2014 15:59
-
-
Save jonman364/06901efc1f2aef8fc7a7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Dim oWim, items, item, info, comp | |
comp = "." | |
If WScript.Arguments.Count > 0 Then | |
comp = WScript.Arguments.Item(0) | |
End If | |
Set oWim = GetObject("winmgmts:\\" & comp & "\root\cimv2") | |
Set items = oWim.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE DNSDomain IS NOT NULL") | |
For Each item In items | |
info = info & item.IPAddress(0) & ": " & item.MACAddress & VBNewLine | |
Next | |
WScript.Echo info |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment