Last active
August 29, 2015 14:10
-
-
Save kkamegawa/c50a4a7d57dd817f8073 to your computer and use it in GitHub Desktop.
Reset Hardware NIC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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