|
Answer» we have 2 workgroup in win network (workgroup and callcenter)
first of all i am listing pc using net view /DOMAIN:workgroup and net view /domain:callcenter
and ping it to find ip and MAC
callcenter pc name is like
\\Agent-1 \\Agent-2 .. .. \\Agent-100
i can find a pc MAC usign this command nbtstat -a Agent-1
1- how can i find all pc mac usign just one command ? 2- i can print it into text file like command > c:\conf.txt. how can i do it for all pc at one timeTry this short piece of code:
Code: [Select]echo off setlocal enabledelayedexpansion
for /f "delims=" %%A in ('net view /domain:workgroup') do ( SET COMP=%%A set comp=!comp:~2! nbtstat -a !comp! >>MAC.txt ) If you are wanting to have a specific output that is maybe only one or two lines per entry, it will require some additional work, so LET us know if that is what you are wanting.first of all
fetching mac all pc in workgroup in one go
Quote from: zodehala on February 04, 2012, 02:47:03 AM first of all
fetching mac all pc in workgroup in one go
Ummm... What?
|