Enable SSH on ESXi host – PowerCLI

To enable SSH on one host, use the below command from PowerCLI.

Get-VMHost esxi-1.vmmaster.local | Get-VMHostService | Where { $_.Key -eq "TSM-SSH" } | Start-VMHostService

1

Infact, this can be used to start/stop any VMHostService. You just need to replace the Key value accordingly.

1

For example, To Stop the vCenter Agent, use below

Get-VMHost esxi-1.vmmaster.local | Get-VMHostService | Where { $_.Key -eq "vpxa" } | Stop-VMHostService

To enable/disable Services on multiple hosts, check my another post here

Hope this was informative. Thanks!

Advertisements