Hyper-V Virtual Switch Internal with NAT -Update-

This is a quick blog post to correct a “legacy blog” I made in January this year..

I haven’t been using any VM’s on my Surface for a long time, since then new Windows 10 builds have arrived. As Thomas Maurer discribes here things have changed.

If you were running the commands in my previous blog and have been using it you have come to the conclusion (I hope sooner as me 🙂 ) that the Nat VSwitch is gone and the VM’s depending on it have no network connection.

You can recreate it as internal VSwitch like this:

New-VMSwitch -Name VSwitch-NAT -SwitchType Internal
New-NetIPAddress –IPAddress -PrefixLength -InterfaceAlias "vEthernet (VSwitch-NAT)"
New-NetNat –Name NATnetwork –InternalIPInterfaceAddressPrefix

But you will run in to an issue with the last command.

PS C:\WINDOWS\system32> New-NetNat –Name NATnetwork –InternalIPInterfaceAddressPrefix
New-NetNat : The parameter is incorrect.
At line:1 char:1
+ New-NetNat –Name NATnetwork –InternalIPInterfaceAddressPrefix 10.10.0 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (MSFT_NetNat:root/StandardCimv2/MSFT_NetNat) [New-NetNat], CimException
    + FullyQualifiedErrorId : Windows System Error 87,New-NetNat

Since you already used this command in the previous blog it’s still there and ready to use.
So change your VM to the new Vswitch-NAT virtual switch and make sure your VM uses the 10.10.0.x/24 ip range and subnet with as gateway and your VM should have network and internet connectivity again.

Pascal Slijkerman

Leave a Comment