Windows – DHCP Search ip address/hostname

dhcpdhcp-serverwindowswindows-server-2008windows-server-2008-r2

In the context of a Service Desk, the engineers have to lookup the IP addresses in the DHCP server a lot. For example to use a VNC viewer.

I can't find a tool on the internet that actually makes it possible to search for an ip address, hostname or mac address in the leased addresses.

Best Answer

You can use the following PowerShell cmdlet:

Get-DhcpServerv4Lease

example:

Get-DhcpServerv4Lease -ScopeId 192.168.1.0 |Where-Object {$_.IPAddress -eq "192.168.1.100"}

What I would do is schedule the creation of a CSV file regularly so the Service Desk team can easily search in it:

Get-DhcpServerv4Lease -ScopeId 192.168.1.0 |Export-Csv -Path \\myFileServer\DHCPInfo\dhcp.csv -NoTypeInformation