preloader
12 August 2011 / #Powercli

SSH activation oneliner

post-thumb

Still in the Memento/oneliner category, here is one to activate the Remote Tech Support Mode (aka TSM-SSH) on all ESX servers who doesn’t have the right startup policy setted up and/or the service was stopped:

tsm-ssh_policy

We reconfigure the startup policy to set it up on Start and stop with host (mode = on) and we start the service :

Get-VMHost | ?{ $_.ConnectionState -eq "Connected" } | Get-VMHostService | ?{ $_.Key -eq "TSM-SSH" -and ($_.Policy -ne "on" -or $_.Running -ne $true) } | %{ Set-VMHostService $_ -Policy "on"; Start-VMHostService $_ }

tsm-ssh_pcli

tsm-ssh_tasks


> Frederic MARTIN