Hi gurus
I have an esxi host already added to vcenter with only one nic(vmnic0), I would like to use cli to add the second vmnic1 to the host vswitch so I can have
the following
and not
Thanks for any help
Try like this
$swName = 'vSwitch0'
$nicName = 'vmnic1'
Get-VMHost -Name $esxName | Get-VirtualSwitch -Name $swName -PipelineVariable vss |
ForEach-Object -Process {
Set-VirtualSwitch -VirtualSwitch $vss -Nic (@($vss.Nic) + $nicName) -Confirm:$false
}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Try like this
$swName = 'vSwitch0'
$nicName = 'vmnic1'
Get-VMHost -Name $esxName | Get-VirtualSwitch -Name $swName -PipelineVariable vss |
ForEach-Object -Process {
Set-VirtualSwitch -VirtualSwitch $vss -Nic (@($vss.Nic) + $nicName) -Confirm:$false
}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
L.
as always thanks for all the help...stay safe