VMware Cloud Community
cmichals
Contributor
Contributor

Need Powercli help

I have a large VSAN Cluster and I need to run a command on each host.

Instead of enabling ssh and putty into each host to run the command, I am hoping someone could give me some advice on how to do this within Powercli.

I am hoping this can be done in powercli as it would be time consuming to enable ssh and putty to every host to run the command

The command I need to run on every host in the cluster is...

esxcfg-advcfg -s 1 /VSAN/IgnoreClusterMemberListUpdates

 

0 Kudos
2 Replies
LucD
Leadership
Leadership

You could do something like this

Get-Cluster -Name MyCluster |
Get-VMHost -PipelineVariable esx |
ForEach-Object -Process {
    Get-AdvancedSetting -Entity $esx -Name "VSAN.IgnoreClusterMemberListUpdates" | 
    Set-AdvancedSetting -Value 1 -Confirm:$false
}


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

0 Kudos
cmichals
Contributor
Contributor

  • Thank you so much
0 Kudos