Finding IP Address Assigned by DHCP

by Oct 3, 2016

Beginning with Windows 8 and Server 2012, operating systems ship with extensive PowerShell modules to manage server and client. They provide cmdlets like Get-NetIPAddress.

If you’d like to get a list of all IP addresses originating from DHCP, you could try this:

#requires -Version 3.0 -Modules NetTCPIP

Get-NetIPAddress | 
  Where-Object PrefixOrigin -eq dhcp | 
  Select-Object -ExpandProperty IPAddress

Twitter This Tip! ReTweet this Tip!