Disable or enable a network adapter from PowerShell
Toggle any NIC off and on with Disable-NetAdapter / Enable-NetAdapter — the command-line equivalent of right-clicking in Device Manager.
01Command
$ Disable-NetAdapter -Name "Wi-Fi" -Confirm:$false02What it does
Enable-NetAdapter/Disable-NetAdapter are the forgotten pair many admins do by hand in Device Manager; they work on any adapter visible to Get-NetAdapter, including virtual ones. Disable is equivalent to an unplug, so the driver-level state resets — useful when Wi-Fi hangs or a NIC negotiates a bad link. Use -Confirm:$false in scripts because the default prompts interactively.
03Risk
04Undo
$ Enable-NetAdapter -Name "Wi-Fi"05Sources
- Disable-NetAdapter | Microsoft LearnEvidence: Microsoft documents Disable-NetAdapter as disabling an adapter, requiring administrator privileges and prompting for confirmation unless -Confirm:$false is supplied.
- Enable-NetAdapter | Microsoft LearnEvidence: Microsoft documents Enable-NetAdapter as the cmdlet that re-enables a previously disabled network adapter.
Last verified: 2026-09-17 · 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.