$Computer = "." $net = Get-WMIObject -class Win32_NetworkAdapterConfiguration -ComputerName $computer $netenabled = $net | where {$_.IPenabled} foreach ($NetCard in $netenabled) { "Releasing lease on: {0}" -f $netcard.caption $netcard.ReleaseDHCPLease() }