1

Get-NetIPConfiguration doesn't show DHCP server's ip address information. How can I do same as ipconfig /all but with PowerShell native tools?

Random Guy
  • 69
  • 1
  • 8

1 Answers1

3

Use this :

Get-CimInstance Win32_NetworkAdapterConfiguration -Filter "DHCPEnabled=$true" | Select DHCPServer

if you use Windows 7 / 2008 R2 or below :

Get-WMIObject Win32_NetworkAdapterConfiguration -Filter "DHCPEnabled=$true" | Select DHCPServer

Both will retrieve only interface with DHCP enabled, remove the filter if you want them all

CFou
  • 978
  • 3
  • 13