G
Guest
Guest
Archived from groups: microsoft.public.windowsxp.general (More info?)
I have a script which allows you to enter a hostname and it would return the
MAC address of that computer. How do I modify it so that I could enter a
MACAddress and have it return the hostname or logon username? Appreciate any
help, thanks.
strComputerName = InputBox("Enter the name of the computer you wish to query")
strWinMgt = "winmgmts://" & strComputerName &""
Set IPConfigSet = GetObject (strWinMgt).ExecQuery("select MACAddress,
DNSHostname from Win32_NetworkAdapterConfiguration")
for each IPConfig in IPConfigSet
WScript.Echo "MACAddress: " & IPConfig.MACAddress
next
I have a script which allows you to enter a hostname and it would return the
MAC address of that computer. How do I modify it so that I could enter a
MACAddress and have it return the hostname or logon username? Appreciate any
help, thanks.
strComputerName = InputBox("Enter the name of the computer you wish to query")
strWinMgt = "winmgmts://" & strComputerName &""
Set IPConfigSet = GetObject (strWinMgt).ExecQuery("select MACAddress,
DNSHostname from Win32_NetworkAdapterConfiguration")
for each IPConfig in IPConfigSet
WScript.Echo "MACAddress: " & IPConfig.MACAddress
next