0

In Windows Server acting as a DHCP server, how can I get a list of the DHCP reservations from the CMD? I need to know

  • the MAC address and
  • the IP address reserved to that MAC address inside the DHCP server.

Right now I have to right click every single item and go to Properties.

Esa Jokinen
  • 46,944
  • 3
  • 83
  • 129
Malkavian
  • 125
  • 2
  • 12
  • I removed the Windows 2008 Server mentioned, as it's EoL, although you mentioned "or later". As the same still applies to Windows Server 2012-2019, this question should not be closed as off-topic. – Esa Jokinen May 13 '20 at 06:11

3 Answers3

1

Since Windows Server 2003 there has been netsh dhcp server. You need a command prompt with administrative privileges to use it. E.g. for the list of the DHCP reservations:

netsh dhcp server scope 192.0.2.0 show reservedip

Or from another machine:

netsh dhcp server \\SERVERNAME scope 192.0.2.0 show reservedip
netsh dhcp server <ServerIP> scope 192.0.2.0 show reservedip

If you don't know the scope address, you can list all scopes on the server with:

netsh dhcp server show scope

Or you could even export the whole server configuration into a file (only on the local server):

netsh dhcp server export c:\temp\dhcpdb

The netsh has its documentation baked in: you can get a list of commands currently available by giving an incomplete command. You could start with:

C:\Windows\system32>netsh dhcp server
list                          - Lists all the commands available.
dump                          - Dumps configuration to a text file.
help                          - Displays help.
. . .
Esa Jokinen
  • 46,944
  • 3
  • 83
  • 129
0

PowerShell module DhcpServer has Get-DhcpServerv4Reservation:

Get-DhcpServerv4Reservation -ComputerName "dhcpserver.contoso.com" -ScopeId 10.10.10.0
Esa Jokinen
  • 46,944
  • 3
  • 83
  • 129
Daniel
  • 1
  • 1
0

arp -a Shows list of current reservations on your network. Addresses with type=dynamic are reserved addresses