Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Use PowerShell to Disable All Network Adapters

$
0
0

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.


Viewing all articles
Browse latest Browse all 3333

Trending Articles