This article has not been completed yet. However, it may already contain helpful Information and therefore it has been published at this stage.


  • Azure Stack HCI Single Node

Creating an internal virtual switch

# Creating an interal virtual switch
New-VMSwitch -SwitchName NAT_vSwitch -SwitchType Internal -Verbose
# Determining ifIndex
# Setting up the NAT-Gateway
New-NetIPAddress -IPAddress -PrefixLength 24 -InterfaceIndex 20 -Verbose
# Setting up the NAT-Network
New-NetNat -Name NATNetwork -InternalIPInterfaceAddressPrefix -Verbose
# Connecting VMs
Get-VM | Get-VMNetworkAdapter | Connect-VMNetworkAdapter -SwitchName NAT_vSwitch

Expected Result:

Finally, an IP from the NAT network has to be assigned to the connected VMs and the default gateway address has to be set to the NAT gateway address.

The subnet mask is to be defined with and as DNS you can take .

You are now connected to the Internet.

Expected Result:


Set up a NAT network
Set up a NAT network
How To Configure Hyper-V Virtual Switch That Supports NAT Network with PowerShell? #HyperV #PowerShell - CHARBEL NEMNOM - MVP | MCT | CCSP | CISM - Cloud & CyberSecurity
In this article, we will show you how to configure Hyper-V virtual switch that supports NAT Network with PowerShell.