Skip to content

Instantly share code, notes, and snippets.

@giovannicandido
Created February 25, 2018 13:08
Show Gist options
  • Save giovannicandido/e1595e6b125b7b3d2736c3a049771e8f to your computer and use it in GitHub Desktop.
Save giovannicandido/e1595e6b125b7b3d2736c3a049771e8f to your computer and use it in GitHub Desktop.
New-VMSwitch –SwitchName "Internal-Switch" –SwitchType Internal –Verbose
Get-NetAdapter
Write-Host "I going to create a IPAddress in the Internal-Switch"
$InterfaceIndex = Read-Host -Prompt 'What Interface Index?'
New-NetIPAddress –IPAddress 192.168.50.1 -PrefixLength 24 -InterfaceIndex $InterfaceIndex –Verbose
New-NetNat –Name InternalNATNetwork –InternalIPInterfaceAddressPrefix 192.168.50.0/24 –Verbose
Write-Host "Add VM to the Internal-Switch. Router is 192.168.50.1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment