Skip to content

Instantly share code, notes, and snippets.

@kkamegawa
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kkamegawa/c50a4a7d57dd817f8073 to your computer and use it in GitHub Desktop.
Save kkamegawa/c50a4a7d57dd817f8073 to your computer and use it in GitHub Desktop.
Reset Hardware NIC
if ([System.Diagnostics.EventLog]::SourceExists("PowerShellScriptEvent") -eq $false){
New-EventLog -LogName Application -Source PowerShellScriptEvent
}
Get-NetAdapterHardwareInfo | Restart-NetAdapter -Confirm:$false
Write-EventLog -LogName Application -EntryType Error -Source PowerShellScriptEvent -EventId 1 -Message "Reset HW NIC"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment