Using netsh command to extract dhcp client list

Applies to Windows Server 2008 and above

Please note that in future versions of Windows, Microsoft might remove the Netsh Functionality for DHCP Server. The recommended usage is with Windows Powershell. We will explore that in a later post.

In this example I have considered DHCP Server as \\mydhcpservername and scope as 192.168.0.0

Run Command Prompt

c:\>netsh
netsh>dhcp
netsh dhcp>server
netsh dhcp server>\\mydhcpservername
netsh dhcp server>show scope 192.168.0.0

Changed the Current Scope Context to 192.168.0.0 Scope

netsh dhcp server scope>show client 1

The above command will list the following in the below order

  • IP Address
  • Subnet Mask
  • MAC Address
  • Lease Expiry
  • Type of Lease
  • Name of Connected Device
Advertisements

About Sunil Padmanabhan

An Indian based out of Dubai who started traveling from 2011 and pretty much caught the travel bug. Every year presents itself as an opportunity to visit and explore a new place.

Posted on April 10, 2014, in Windows Server 2008, Windows Server 2008R2, Windows Server 2012, Windows Server 2012 R2 and tagged . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: