Enable TSM-SSH Remote on all vSphere Servers ESXi 5.x

Sometimes during daily operations, can it be required to perform a SSH connection towards each vSphere host in the environment. For example : Correct the fiber settings.

 

This can be automated enable by the following command lines in PowerCCLI.

 

vi-connect -server vCenter

Get-VMHost | Foreach { Start-VMHostService -HostService ($_ | Get-VMHostService | Where { $_.Key -eq “TSM-SSH”} ) }

 

Disabling can be done through:

Get-VMHost | Foreach { Stop-VMHostService -HostService ($_ | Get-VMHostService | Where { $_.Key -eq “TSM-SSH”} ) }

Additional information