PowerTip: Use PowerShell to Disable All Network Adapters

Doctor Scripto

Summary: Use Windows PowerShell to disable all network adapters on your system.

Hey, Scripting Guy! Question 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?

Hey, Scripting Guy! Answer 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.

0 comments

Comments are closed. Login to edit/delete your existing comments