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.

WindowsnetworkadapterpowershellMedium risk
Run Disable-NetAdapter -Name "Wi-Fi" -Confirm:$false to turn the adapter off, and Enable-NetAdapter -Name "Wi-Fi" to bring it back.

01Command

Command
$ Disable-NetAdapter -Name "Wi-Fi" -Confirm:$false

02What 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

RiskMedium risk
RequirementsRun PowerShell as Administrator
!Warning: Disabling the adapter you are connected through (especially over RDP) cuts your access — run a re-enable as a scheduled task first if you are remote.

04Undo

Undo
$ Enable-NetAdapter -Name "Wi-Fi"

05Sources

  • Disable-NetAdapter | Microsoft Learn
    Microsoft · vendor-doc · 2026-09-17
    Evidence: Microsoft documents Disable-NetAdapter as disabling an adapter, requiring administrator privileges and prompting for confirmation unless -Confirm:$false is supplied.
  • Enable-NetAdapter | Microsoft Learn
    Microsoft · vendor-doc · 2026-09-17
    Evidence: Microsoft documents Enable-NetAdapter as the cmdlet that re-enables a previously disabled network adapter.

Last verified: 2026-09-17 · Category: Network

06Related solutions