VMware Cloud Community
nachogonzalez
Commander
Commander

Enable vDS health check via PowerCLI

Hi I'm working on a script and one of it's steps is to disable/enable vDS health check via powercli.
Does anyone has any idea on how to accomplish this?

Looking forward to hearing from you.

Warm regards

0 Kudos
4 Replies
scott28tt
VMware Employee
VMware Employee

VMTN has an area for PowerCLI, I've reported your thread asking moderators to move it there.

It is unlikely that you are the first ever person to want to do this, it's worth searching the PowerCLI area.

 


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
0 Kudos
LucD
Leadership
Leadership

You can do something like this

$vdsName = 'vds1'
$vds = Get-VDSwitch -Name $vdsName

$spec1 = New-Object -TypeName VMware.Vim.VMwareDVSTeamingHealthCheckConfig
$spec1.Enable = $true

$spec2 = New-Object -TypeName VMware.Vim.VMwareDVSVlanMtuHealthCheckConfig
$spec2.Enable = $true

$vds.ExtensionData.UpdateDVSHealthCheckConfig(@($spec1,$spec2))


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
nachogonzalez
Commander
Commander

Thanks scott, I was just asking for a Friend who got locked out of communities and needed to get some info ASAP.

0 Kudos
nachogonzalez
Commander
Commander

Thanks Luc

0 Kudos