Reply to Message

View discussion in a popup

Replying to:
cliffcahill
Enthusiast
Enthusiast

Its been a  while but here is some updates to the syntax that is working for me .

write-host -ForeGroundColor green "Setting Up Network on Host1"

$esxcli = Get-EsxCli -VMHost Host1

write-host -ForeGroundColor green "Adding portgroup Esx-l3vmotion to vSwitch0"

$esxcli.network.vswitch.standard.portgroup.add("Esx-l3vmotion", "vSwitch0")

write-host -ForeGroundColor green "Setting Portgroup Esx-l3vmotion to vSwitch0"

$esxcli.network.vswitch.standard.portgroup.set("Esx-l3vmotion", "117")

write-host -ForeGroundColor green "Adding vmotion stack to portgroup"

$esxcli.network.ip.netstack.add($false, "vmotion")

write-host -ForeGroundColor blue "Creating Esx-l3vmotion VMKernal on vSwitch0 with VMK Number vmk2"

$esxcli.network.ip.interface.add($null, $null, "vmk2", $null, "1500", "vmotion", "Esx-l3vmotion")

write-host -ForeGroundColor yellow "Assigning 10.10.117.10 to Esx-l3vmotion on vSwitch0"

$esxcli.network.ip.interface.ipv4.set("vmk2", "10.10.117.10","255.255.255.0", $null, "static")

View solution in original post

Reply
0 Kudos