Tuesday, December 03, 2019

Disable/Enable network interface using PowerShell

Windows 10 update 1511 sometimes losses connection inside a VirtualBox(5.0.16) VM. Mostly it happens after the host machine recovers from sleep or hibernate. Workaround I have observed so far is to disable/enable the interface. This can get boring overtime, so below is the PowerShell script that I use to automate it.

Note that O is the name of my network adapter.

No comments:

Test page for code formatting

netsh advfirewall firewall add rule name = "RPC Endpoint Mapper" dir = in action = allow protocol = TCP localport = 1...