Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a command where I can convert the mac address column of the DHCP lease to txt file or CSV? I am setting up mac filtering on a wireless controller but just want to use copy and paste instead of typing out each MAC address. Maybe a netsh or something?

It is a 2003 server.

share|improve this question
Which platform are you using? – Mark Henderson Aug 7 '09 at 2:44
up vote 4 down vote accepted

On Windows 2003 you can use the netsh command to get information from the dhcp server

@echo off
set server=dhcpsrv1
set scope=
netsh dhcp server \\%server% dump > %server%.dump.txt
netsh dhcp server \\%server% scope %scope% show clients 1 > %server%.%scope%.txt
share|improve this answer
Thanks that worked perfectly – JohnyV Aug 7 '09 at 5:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.