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
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.
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
# ==============================================================
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.