DHCP lease information to file

8,191

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
Share:
8,191

Related videos on Youtube

JohnyV
Author by

JohnyV

Updated on September 17, 2022

Comments

  • JohnyV
    JohnyV almost 2 years

    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.

    • MrGigu
      MrGigu almost 15 years
      Which platform are you using?
  • Admin
    Admin over 7 years
    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. ;)