Set up a NAT network on Hyper-V host

  1. Open a PowerShell console as Administrator
  2. Create an internal switch
    New-VMSwitch -SwitchName "NAT Switch" -SwitchType Internal
  3. Get InterfaceIndex from Get-NetAdapter
  4. Allocate IP for the new switch,
    New-NetIPAddress -IPAddress -PrefixLength 24 -InterfaceIndex 43
  5. Configure the NAT network
    New-NetNat -Name VMSwitchNAT -InternalIPInterfaceAddressPrefix
  6. You can now connect your Hyper-V virtual machines to this switch and allocate IPs in

DHCP is not configurated as it's not that easy on Windows…

See Alsos