Avatar of bsharath
bsharath
Flag for India asked on

Reservation of ip list

Hi,

I have a DHCP server in which i have reserved 100 ip's to different persons with different mac and ip addresses.What i want now is to get all the reserved details to a txt file.I know we can export the reservations by Right click >Reservations> Export.But this only exports the ip address and Machine name.I want the Mac address and Names what i have specified while reserving.

Regards
Sharath
Microsoft Legacy OSMicrosoft Server OS

Avatar of undefined
Last Comment
samiam41

8/22/2022 - Mon
samiam41

1. Dump config to a text file : netsh dhcp server \\yourservername dump >config.txt
2. Edit the file as needed
3. Import the modified conf : netsh dhcp server \\yourservername import config.txt
4. Restart the DHCP service.

You will need to clean out the extra stuff listed.
samiam41

samiam41

Did this work?
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
bsharath

ASKER
When i use this

netsh dhcp server \\yourservername import config.txt

I get this

C:\>netsh dhcp server \\inadssrv01 import config.txt

To import service configuration from a file.

Syntax:

        import <Filename> <ScopeList>

Parameters:

        FileName       - File where the configuration is stored.

        ScopeList      - List of subnet IP addresses (separated by spaces)
                         of all the scopes that need to be imported.
                         If all the scopes need to be imported, the string
                         "all" can be specified.


Notes:         This command works only on the local server
.
               The command takes a long time to execute if the
               service has a large number of scopes or large number
of
               clients, etc.  Also, while the command is in progress,
               the service is stopped and will not respond to clients
.

Example:       import c:\temp\dhcpdb all

               This command imports  the full configuration from
               the file c:\temp\dhcpdb.

               import c:\temp\dhcpdb 10.0.0.0 20.0.0.0

               This command imports the configuration pertaining to
               scopes 10.0.0.0 and 20.0.0.0 from the file c:\temp\dhcpdb
.

DHCP Server import failed.

Parameter(s) passed are either incomplete or invalid.

When i use this

netsh dhcp server \\yourservername dump >config.txt

I get this in the txt file



# ==============================================================
#  Configuration Information for Server 159.160.120.90                  
# ==============================================================



# =====================================
#     Add Classes                      
# =====================================
samiam41

If you just want to dump your IP reservations (the original question), then use the first step and clean up the text file.
bsharath

ASKER
This one

netsh dhcp server \\yourservername dump >config.txt

Above is the error i got for this...
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
samiam41

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
samiam41

Thanks!