Sponsored Links

Login Form






Lost Password?

Syndicate

Home
Get Remote Machine's MAC Address PDF Print E-mail
User Rating: / 0
PoorBest 
Written by Cheyenne Harden   

In a script I use I need to query all of a machine's MAC addresses.
So, I pulled this function out and made it a stand alone script.
Use can query by IP or by computer name.

 

 

 

----------COPY EVERYTHING BELOW THIS LINE----------

'Get Coputers MAC Address
'Created by Chey Harden 8.11.08


On error resume next
strComputer = (InputBox("Enter the name of the computer to get the MAC address", "Computer Name"))
If strComputer <> "" Then
strInput = True
End if
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery _
("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True")
For Each objItem in colItems
Wscript.Echo objItem.MACAddress
Next
 
----------COPY EVERYTHING ABOVE THIS LINE----------


MAKE SURE NO WORD WRAP IS HAPPENING IN YOUR SCRIPT


           

This information is provided "AS IS" with no warranties expressed or implied.

Comments
Add New
J.R.  - Nice.   |128.138.140.141 |11-09-2008 15:26:52
Nice script!

Is there a way to have a button that would copy this MAC to the
Clipboard? :3
Chey Harden  - Add Clipboard functionality     |12.167.252.35 |15-09-2008 14:12:51
Set clip = CreateObject ("WshExtra.Clipb oard"
Clip.Cop
y(objItem.MACAddress )
Write comment
Name:
Email:
 
Title:
 
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):s
:!::?::idea::arrow:
 
Please input the anti-spam code that you can read in the image.

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

 
Tag it:
Delicious
Furl it!
Spurl
digg
YahooMyWeb
< Prev   Next >
 

Google Search

Google