PowerTip: Use PowerShell to Disable All Network Adapters
Summary: Use Windows PowerShell to disable all network adapters on your system.
I often work in offline situations, and I would like to disable all network adapters on my laptop for security reasons
and to help to extend battery life. How can I use Windows PowerShell to do this easily?
Use the Get-NetAdapter cmdlet to retrieve all network adapters and pipe the results to the
Disable-NetAdapter cmdlet. To suppress confirmation messages use the –Confirm parameter
and set it to $false:
Get-NetAdapter | Disable-NetAdapter -Confirm:$false
Note This command requires admin rights.