Re: WMI script
- From: "Steve Schofield" <steve@xxxxxxxxx>
- Date: Fri, 22 Jul 2005 12:08:27 -0400
If I understand your question you want the script to resolve the machine by
MAC Address. As far as I know, the only way to resolve names in WMI is by
server name or dns name. When resolving a machine name by MAC address I
don't believe WMI will resolve using GetObject. MAC Address is layer 2. I
don't believe there is way to have achieve what you are asking.
One option that *might* help is a utility in the windows 2003 resource kit
called 'getmac.exe' that will resolve the machine name and return the mac
address of the machine name. Another idea is to ask this question in the
scripting newsgroups or send it to the scripting guys on Microsoft website.
Hope that helps
Steve Schofield
steve@xxxxxxxxx
"UWKC Admin" <UWKCAdmin@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:8E4F9369-528A-4418-BB10-4DF4D46F90DB@xxxxxxxxxxxxxxxx
>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
>
.
- References:
- WMI script
- From: UWKC Admin
- WMI script
- Prev by Date: Re: Killing a Service
- Next by Date: Re: How to Verify That SP1 Has Been Installed on Windows Server 2003
- Previous by thread: WMI script
- Next by thread: Any issues with Windows 2003 Server for development purposes?
- Index(es):
Relevant Pages
|