jravnsba1
Contributor
Contributor

Hi Luc

Yes this script works, but no hostname is displayed, so you :

Key                      Label                          Policy     Running  Required

---                           -----                          ------       -------         --------

TSM-SSH              SSH                            off        True         False 

TSM-SSH              SSH                            off        True         False 

If you select the vmhost the properties are missing from the Hostservice object and the script fail :disappointed_face:

Get-VMHost | Get-VMHostService  |where {$_.Key -eq 'TSM-SSH' -and $_.Running} | select vmhost |

Out-GridView -OutputMode Multiple -Title "Select ESX where SSH should be stopped" |

Stop-VMHostService -confirm:$false

Joern Ravnsbaek
Reply
0 Kudos