Skip to content

Instantly share code, notes, and snippets.

@technoscavenger
Created December 4, 2019 01:35
Show Gist options
  • Save technoscavenger/6b9c5ff923c9d861ffc666652e397347 to your computer and use it in GitHub Desktop.
Save technoscavenger/6b9c5ff923c9d861ffc666652e397347 to your computer and use it in GitHub Desktop.
Disable/Enable network interface using PowerShell
$nic = Get-NetAdapter -Name 'O'
"Disabling nic"
$nic | Disable-NetAdapter -Confirm:$false
"Enabling nic"
$nic | Enable-NetAdapter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment