1

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.

Insyte
  • 9,314
  • 2
  • 27
  • 45
JohnyV
  • 938
  • 4
  • 26
  • 45

2 Answers2

4

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

@echo off
set server=dhcpsrv1
set scope=192.168.0.0
netsh dhcp server \\%server% dump > %server%.dump.txt
netsh dhcp server \\%server% scope %scope% show clients 1 > %server%.%scope%.txt
Zoredache
  • 128,755
  • 40
  • 271
  • 413
0

Old Post But...

I am on Windows Server 2008. Right Click on "Address Leases" Here" DHCP>Your.Domain.Com>IPv4>Scope>Address Leases>Export List...

This got me a decent CSV file with the info I needed, although it looks like it did not export the "-"'s in the MAC, O Well...

Justin
  • 1
  • Welcome to the community, please note that the OP asked for a **command**, not something with GUI. Please pay close attention to what OPs may ask and also be sure to use the right paraphrasing so other users will find your answer easier to read. Wish you luck, and success. ;) –  Mar 24 '17 at 18:39