Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Return MAC address for all machines on Network

37 views
Skip to first unread message

Tim Davidge

unread,
Jun 2, 2003, 4:00:21 PM6/2/03
to
Hi folks,

Has anyone had occasion to query all machines on a domain and return the
machine name and MAC address for each ? I'm interested in enabling
Wake-on-lan functionality and need to build a list of all of the address and
machine locations in order to progress.

Any assistance would be greatly appreciated.

TD


nntp

unread,
Jun 2, 2003, 5:16:34 PM6/2/03
to
how about something like this? brute force, but should work....

for each possible ip on subnet
shell ping ip
shell arp -a >> output file
parse output file
next ip

"Tim Davidge" <tdavidge@no_spam.hotmail.com> wrote in message
news:uGSUaGUK...@TK2MSFTNGP11.phx.gbl...

[MS] Scott McNairy

unread,
Jun 3, 2003, 1:35:32 PM6/3/03
to
From a WMI perspective you can do this in an active directory domain by
doing this:
set svc = getobject("winmgmts:root\directory\ldap")
set compEnum = svc.execQuery("select ds_cn from ds_computer")

for each obj in compEnum
wscript.echo obj.ds_dn

' as for the MAC Address per computer See the Win32_NetAdapter or the
Win32_NetworkAdapterConfiguration class

next

--
[MS] Scott McNairy
WMI Test Engineer
This posting is provided "As Is" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

"Tim Davidge" <tdavidge@no_spam.hotmail.com> wrote in message
news:uGSUaGUK...@TK2MSFTNGP11.phx.gbl...

0 new messages