Last active
May 14, 2020 16:10
-
-
Save thiagoeh/f1f437aff3a7a2896ee4ea73d1e72770 to your computer and use it in GitHub Desktop.
Hyper-V NAT Switch Setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://docs.microsoft.com/en-us/powershell/module/hyper-v/New-VMSwitch | |
| # https://docs.microsoft.com/en-us/powershell/module/hyper-v/Remove-VMSwitch | |
| New-VMSwitch –SwitchName "NAT-Switch" –SwitchType Internal –Verbose | |
| # https://docs.microsoft.com/en-us/powershell/module/netadapter/Get-NetAdapter | |
| # https://docs.microsoft.com/en-us/powershell/module/hyper-v/Get-VMSwitch | |
| Get-VMSwitch | |
| Get-NetAdapter | |
| New-NetIPAddress -IPAddress 192.168.200.1 -PrefixLength 24 -InterfaceAlias "vEthernet (NATSwitch)" | |
| New-NetNat –Name NATNetwork –InternalIPInterfaceAddressPrefix 192.168.200.0/24 –Verbose |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment