When troubleshooting network connectivity issues, resolving IP address conflicts, or switching network environments in Windows 11, releasing and renewing your Dynamic Host Configuration Protocol (DHCP) lease is a standard administrative procedure. While legacy tools like ipconfig /release and ipconfig /renew operate globally or rely on loose adapter descriptions, modern Windows environments running PowerShell provide granular, programmatic cmdlets through the NetTCPIP module and Windows Management Instrumentation (WMI/CIM) infrastructure.
Automating or targeting lease renewals on specific virtual adapters, Wi-Fi interfaces, or Hyper-V virtual switches ensures network continuity across unrelated adapters without interrupting vital remote sessions or active background transfers. This step-by-step guide explains how to inspect existing DHCP lease expiration states, release an active lease, and request an immediate lease renewal in Windows 11 using native PowerShell commands.
Understanding DHCP Lease Mechanics in Windows 11
Dynamic Host Configuration Protocol assigns IP configurations—including client IP addresses, subnet masks, default gateways, and DNS servers—on a lease basis. Under standard Windows behaviour, client systems periodically attempt to renew their lease when half of the lease lifetime elapses (the T1 renewal timer). If a DHCP server changes configuration pools, router gateways, or DNS resolvers before a lease expires, your client system may retain obsolete routing tables or stale gateway parameters.
Performing a manual release drops the current IP assignment and sends a DHCPRELEASE message to the server, clearing the client binding. Requesting a renewal triggers a DHCPREQUEST broadcast (or unicast, depending on the state), compelling the server to acknowledge with a fresh DHCPACK packet containing up-to-date network metrics.
Method 1: Release and Renew IP Leases Using NetTCPIP Cmdlets
The native PowerShell NetTCPIP module provides modern, structured cmdlets designed to interact with network interfaces without parsing raw command-line text strings.
Step 1: Open PowerShell with Administrative Privileges
Releasing and renewing network interfaces modifies system network stacks and requires elevated permissions:
- Press Win + X or right-click the Windows Start menu icon.
- Select Terminal (Admin) or PowerShell (Admin).
- Select Yes when prompted by the User Account Control (UAC) dialogue.
Step 2: Identify the Target Interface Index
Before releasing a lease, verify the network interface name and numerical index (InterfaceIndex) using Get-NetIPInterface:
Get-NetIPInterface -AddressFamily IPv4 | Select-Object InterfaceAlias, InterfaceIndex, Dhcp, ConnectionState
Identify the adapter you wish to renew, such as Wi-Fi or Ethernet, and note its corresponding InterfaceIndex (for example, 12) and ensure that Dhcp is set to Enabled.
Step 3: Check Current Lease Details
To inspect current DHCP server addresses and lease status before making changes, run:
Get-NetIPConfiguration -InterfaceIndex 12
This command outputs the current IPv4 address, default IPv4 gateway, and configured DNS servers for the specified interface.
Step 4: Execute Renew-NetIPAddress
PowerShell provides the dedicated cmdlet Renew-NetIPAddress to trigger a DHCP lease renegotiation for an individual adapter or all interfaces:
# Renew a specific network interface by InterfaceIndex
Renew-NetIPAddress -InterfaceIndex 12
# Alternatively, renew by interface alias
Renew-NetIPAddress -InterfaceAlias "Wi-Fi"
To target both IPv4 and IPv6 addresses across all DHCP-enabled interfaces on the system, omit the index argument:
Renew-NetIPAddress
The cmdlet sends renewal packets across the designated interfaces. If the DHCP server responds, your connection immediately refreshes with the validated lease parameters.
Method 2: Release and Renew Using CIM/WMI Classes
For scenarios where you need an explicit release step before re-requesting an address—such as when intentionally clearing an IP conflict—the Win32_NetworkAdapterConfiguration CIM class offers direct control via the ReleaseDHCPLease and RenewDHCPLease methods.
Step 1: Locate the Adapter Configuration via Get-CimInstance
Query the network adapter configuration where DHCP is enabled:
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Filter "DHCPEnabled = True" | Select-Object Description, Index, IPAddress, DHCPServer
Step 2: Release the DHCP Lease
Store the target adapter in a variable and invoke the ReleaseDHCPLease method:
# Retrieve the specific adapter by its Index
$adapter = Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Filter "Index = 1"
# Invoke the release method
Invoke-CimMethod -InputObject $adapter -MethodName ReleaseDHCPLease
A ReturnValue of 0 indicates success. At this point, the network adapter drops its assigned IP address and displays 0.0.0.0 or transitions to an APIPA address (169.254.x.x).
Step 3: Renew the DHCP Lease
To request a new lease from the DHCP server on the same adapter, invoke RenewDHCPLease:
Invoke-CimMethod -InputObject $adapter -MethodName RenewDHCPLease
A return value of 0 confirms that the DHCP lease was successfully granted by the server.
Method 3: Executing ipconfig Directives Within PowerShell
If you are writing scripts that require backward compatibility with legacy command processors or environments where CIM access is restricted, native ipconfig switches can be executed seamlessly from within PowerShell.
Step 1: Release the Adapter
# Release all interfaces
ipconfig /release
# Or release a specific connection using wildcards
ipconfig /release "Wi-Fi*"
Step 2: Flush the Local DNS Resolver Cache
When renewing a lease to solve connection problems, stale DNS records frequently persist. Flush the resolver cache prior to renewal:
Clear-DnsClientCache
Step 3: Renew the Connection
# Renew all interfaces
ipconfig /renew
# Or renew the specific connection
ipconfig /renew "Wi-Fi*"
Verification and Troubleshooting Common Errors
Once you execute the release and renewal commands, confirm that the adapter received valid lease properties:
Get-NetIPConfiguration -InterfaceAlias "Wi-Fi" | Format-List InterfaceAlias, IPv4Address, IPv4DefaultGateway, DNSServer
- APIPA Address Assigned (169.254.x.x): If the renewal completes but the adapter displays an address starting with
169.254, the client failed to reach a responsive DHCP server. Check physical cabling, Wi-Fi security keys, or local router operational status. - Access Denied Errors: Ensure PowerShell is running under an elevated administrative token. Standard user sessions lack the privilege to modify network interface configurations.
- Virtual Adapter Conflicts: When running WSL 2 or Hyper-V, isolate the physical interface index to ensure virtual switch adapters are not inadvertently toggled during bulk operations.