Re: WMI script

Tech-Archive recommends: Fix windows errors by optimizing your registry



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
>


.



Relevant Pages

  • Re: dialog - absolute beginner problems
    ... > I don't know how to resolve the problem:( ... > mac() ... Any chance that you have only one '>' character in your actual script? ... A double '>>' means append to the existing file, ...
    (comp.unix.shell)
  • Re: Why Canšt You Buy a Microsoft Branded PC?
    ... and give tech support down the phone to my parents. ... said Mac. ... problem with the lack of integration between Windows and the PC? ... Some are able to resolve the issue, ...
    (comp.sys.mac.advocacy)
  • Re: Error: -3253 Connection to the server failed or was dropped
    ... Entourage on my Mac. ... Test your network with tcpflow. ... Script to activate tcpflow: ...
    (microsoft.public.mac.office.entourage)
  • Re: dhclient and host resolution
    ... (this is the correct IP for the Mac) ... Well, sound like DNS prblems. ... Well, then your MAC should resolve some IP and mx data, when not, the ... Therefore, populate /etc/hosts with the IP/name of FreeBSD box, run ...
    (freebsd-questions)
  • Re: Storing MAC addresses in AD
    ... write a custom script for our VMPS server to query AD directly ... write a sync script to query all objects within AD and regenerate ... Do you currently, or do you plan to, do something with the MAC ... ports to access the servers, while by default anyone else cannot. ...
    (microsoft.public.windows.server.active_directory)