PowerTip: Use PowerShell to Disable Quickly All Net Adapters

PowerTip: Use PowerShell to Disable Quickly All Net Adapters

  • Comments 2
  • Likes

Summary: Use Windows PowerShell 3.0 to quickly disable all network adapters on a laptop.

Hey, Scripting Guy! Question How can I easily disable all network adapters on my Windows 8 laptop with Windows PowerShell 3.0?

Hey, Scripting Guy! Answer Use the Get-NetAdapter cmdlet to retrieve all network adapters and pipe the results to the Disable-NetAdapter cmdlet. Make sure you suppress the confirmation prompts, as shown here.

Get-NetAdapter | Disable-NetAdapter -Confirm:$false

Note   The above command requires Admin rights.

 

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • thanks.

  • just make sure you can connect to the machine in another way when doing this - PS is great in destroying yourself :-)