PowerCLI to start and stop Remote Tech Support (SSH)


Another PowerCLI one-liner to start Remote Tech Support (SSH) on ESX/ESXi:

Get-Cluster -Name "CIT2 CLuster" | Get-VMHost | Get-VMHostService | ? {$\_.Key -eq "TSM-ssh"} | Start-VMHostService

One-liner to stop:

Get-Cluster -Name "CIT2 CLuster" | Get-VMHost | Get-VMHostService | ? {$\_.Key -eq "TSM-ssh"} | Stop-VMHostService -Confirm:$false