Reputation: 81
Get-NetIPConfiguration
doesn't show DHCP server's ip address information. How can I do same as ipconfig /all but with PowerShell native tools?
Upvotes: 2
Views: 6622
Reputation: 1180
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
Upvotes: 4