Re-enable DHCP on an Adapter with PowerShell
Return an adapter to automatic IP assignment after using a manual static address.
01Command
$ Set-NetIPInterface -InterfaceAlias "Ethernet" -Dhcp Enabled02What it does
If a static IP experiment left the adapter misconfigured, flipping the interface's DHCP flag back to Enabled makes Windows lease an address, gateway, and DNS from the router again. The change applies immediately; if the adapter doesn't reconnect, run ipconfig /renew afterwards. Verify the result with Get-NetIPAddress -AddressFamily IPv4.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- NetTCPIP module referenceEvidence: Module reference lists Set-NetIPInterface among the TCP/IP configuration cmdlets.
- Set-NetIPInterface (NetTCPIP)Evidence: Documents the -Dhcp parameter with Enabled/Disabled values and -InterfaceAlias for selecting the adapter.
Last verified: 2026-09-19 · Category: Network
06Related solutions
A built-in PowerShell one-liner that answers 'is port 5432/3389/443 actually open through this network?' — no telnet client needed.
The PowerShell-native replacement for netstat: filter connections by state, port, or process and pipe results instead of parsing text.
The modern, scriptable replacement for nslookup: ask for exact record types, hit specific DNS servers, and see TTLs as objects.