Exporting DHCP to a text file.

Discussion in 'Windows OS's' started by FearisFailure, Nov 3, 2008.

  1. FearisFailure

    FearisFailure Geek Trainee

    Likes Received:
    0
    Trophy Points:
    0
    I'm having a little problem, I'm trying to export my DHCP database to a text file using the good ol Microsoft command line

    dhcpcmd 127.0.0.1 enumclients 11.101.0.0 -h >export.txt and putting my server info were it is needed but not to my surprise when I go to execute the command it tells me dhcpcmd is not a known command go figure.

    Ive looked all over the net and its the same thing. Does anyone know another way? :doh:
     
  2. megamaced

    megamaced Geek Geek Geek!

    Likes Received:
    0
    Trophy Points:
    36
    Are you referring to the Windows Server DHCP database? If so you can simply export it using the DHCP console.
     
  3. lordzehyn

    lordzehyn Geek Trainee

    Likes Received:
    0
    Trophy Points:
    0
    Or you could use netsh and pipe whatever you want to text file.

    e.g. if you want reversations piped use the following:

    netsh dhcp server {IP} scope {scope address} dump > c:\randomcrap.txt

    Lord Zehyn
     
  4. Anti-Trend

    Anti-Trend Nonconformist Geek Staff Member

    Likes Received:
    118
    Trophy Points:
    63
    IIRC, this method doesn't produce a human-readable file.
     
  5. lordzehyn

    lordzehyn Geek Trainee

    Likes Received:
    0
    Trophy Points:
    0
    Who said he wanted to read it? I assumed he was trying to migrate his DHCP settings to another box. ;)
     
  6. Anti-Trend

    Anti-Trend Nonconformist Geek Staff Member

    Likes Received:
    118
    Trophy Points:
    63
    If you're exporting for use on any non-MS DHCP server, the file is pretty close to unusable. So I guess the crux of the matter is what type of DHCP server the data will be migrated to, if any... or if he just needs a human-readable DHCP lease list for a spreadsheet or the like. :)
     
  7. lordzehyn

    lordzehyn Geek Trainee

    Likes Received:
    0
    Trophy Points:
    0
    :eek:

    If he wants a human readable list, he can screengrab it.

    Use your print screen button!
     
  8. Anti-Trend

    Anti-Trend Nonconformist Geek Staff Member

    Likes Received:
    118
    Trophy Points:
    63
    Heh, no kidding. I remember something about writing a conversion script from MS for use with dnsmasq back in the day, but that was a while back. But anyway, this thread is really old (look at the dates!) so hopefully he's done what he needed to by now. :)
     
  9. lordzehyn

    lordzehyn Geek Trainee

    Likes Received:
    0
    Trophy Points:
    0
    I dunno, theres a lot of 'learndirect' insta-techies out there these days. Its entirely possible he's still working on it.
     

Share This Page