February 24th, 2014

PowerTip: Use PowerShell to Display DHCP Addresses

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to display DHCP addresses in Windows 8.

Hey, Scripting Guy! Question How can I use Windows PowerShell on my computer running Windows 8 to find IPV4 addresses
          that are supplied by DHCP?

Hey, Scripting Guy! Answer Use the Get-NetIPAddress function, and specify that the prefix origin is DHCP.
          You can also specify that the address is IPV4, and use other options to help identify what you seek,
          for example:

Get-NetIPAddress -AddressState preferred -AddressFamily ipv4 -Type unicast -PrefixOrigin dhcp

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.