Hyper-V Switch from Internal to External While VMs Running… No Internets for you!

It’s not every day that you get taught new admin concepts using PowerShell by Jeffrey Snover  himself (the guy who invented PowerShell), but I had the privilege of taking part in the TechDays NL 2015 pre-conference workshop on OneGet PowerShell Package Manager and Desired State Configuration (DSC) that Jeff Wouters (PowerShell MVP) organized, and then led along with Mr. Snover. Both Jeffs patiently answered our (sometimes) silly questions and worked hard to make sure we got as much as possible out of the day.

However, no one was able to save me from myself when I learned that enabling External access for your Internal-only Hyper-V virtual switch while the VMs attached to it are running is apparently a bad idea – at least when your host OS is Windows 10 Technical Preview, Build 10122. This warning didn’t put me off:

Warning schmarning...

… and it appeared to work, but not really: it took out my Internet connection completely. Annoyingly enough, the WiFi claimed that it was connected, along with being bridged. Hyper-V added a nifty new generic Ethernet adapter that was supposed to act as a bridge between the virtual switch and my real WiFi. Note the missing vEthernet (External01) Hyper-V Virtual Ethernet Adapter.

A bridge too far...

Another hint was that Get-NetIPAddress only showed the loopback addresses for both IPv4 and IPv6, and nothing else.

There was no reverse – when I tried switching that virtual switch back to Internal, I got “Error applying Virtual Switch Properties changes”:

FixVirtSwitch11

Disabling and re-enabling the WiFi connection also did no good; the WiFi was always connected, but traffic was not being passed from applications. Deleting and reinstalling the WiFi adapter was also not an option.

Note the grey text for the

Note the grey text for the “Delete” option.

However, I was able to delete the generic Ethernet adapter.

FixVirtSwitch13

As soon as that finished, Get-NetIPAddress showed addresses for the WiFi adapter and the virtual switch I hadn’t meddled with. Voila, I had Internet again!

The virtual switch in question was left as a Private Network, and was easily switched back to being Internal. After that, IP addresses (IPv4 and IPv6) showed up for it, too, on Get-NetIPAddress.

FixVirtSwitch14

The goofy-looking font is a special feature of the 10122 build of Windows 10 for Arial font in various contexts, and can be remedied by some simple method I have completely forgotten.

Wish I’d thought of trying this during the workshop, because package management is kind of hard to work with when you don’t have any way to get to a repository, but here it is for you, dear reader. And for Mr. Snover and Mr. Wouters the next time they teach OneGet… er, PowerShell Package Manager.

Network Connections Config Issue in Windows 10 Tech Preview 10041 Build

UPDATE: Blog comments are awesome. Just to stop you from having to look any further, Darren Shetler explains in the comment section (and I’ve confirmed) that the way to fix this is to:

  1. Go into Device Manager
  2. Delete the network devices – do NOT uninstall their drivers when asked!!!
  3. Run “Scan For Hardware Changes” to add the network devices back to Windows

Afterwards, everything worked with an admin account, a regular account (prompts for admin credentials) and still worked after a reboot. If you want to be careful, do this to only one network interface, and confirm that it’s back working before you do the rest; that is, don’t get rid of your otherwise-functional WiFi and wired connections at the same time. Thanks for posting this, Darren!

Follow this Windows Insider Program forum thread for future developments: “Cannot open network connection properties after 10041 update


Aleksandar Nikolic (co-founder and editor of powershellmagazine.com) asked the community if anyone else on the 10041 build of Windows 10 Technical Preview (pushed mid-March 2015) was getting “An unexpected error occurred” when we tried checking or changing the properties of a network connection. I checked with both a regular account (which should have prompted me to enter an admin account’s password) and my admin account, and got the same thing both times:

An unexpected error occurred. Very helpful.

An unexpected error occurred. Very helpful.

However unenlightening that was, it was still better than the absolute nothing that happens when I tried disabling/enabling network devices or clicking “Diagnose this connection” – was it registering that I was clicking at all?

Fabien Didot joined in the thread to let us know that PowerShell cmdlets Get-NetAdapter and Get-NetIpAddress work, and I can confirm that they do from both a regular and an admin account. However, Disable-NetAdapter and Enable-NetAdapter fail from both with an access denied error – expected behavior from a regular account, but certainly not from an admin account. Helps if you start PowerShell using “Run as Administrator” 🙂 Totally works that way!

As far as other reports of this, I’ve turned up the Windows10 subreddit and a Guru3D thread.

If anyone else with the 10041 build could please try enabling or disabling a network interface with PowerShell, please let me know how you get on – is it just me, or are others experiencing this? Again, helps if you remember “Run as Administrator”!

Looks like it really is just the GUI.