VMware Cloud Community
nareshunik
Enthusiast
Enthusiast
Jump to solution

script to find local TSM and remote TSM is enabled on esxi host

Need to script to find on which esxi host in the vcenter is enabled for Local TSM and remote TSM..

0 Kudos
1 Solution

Accepted Solutions
mattboren
Expert
Expert
Jump to solution

Hello, nareshunik-

Thanks to the handy Get-VMHostService cmdlet, you can get this info pretty easily:

Get-VMHost | Get-VMHostService | ?{"TSM","TSM-SSH" -contains $_.Key -and $_.Running} | Select VMHost,Key,Running

The output is something like:

VMHost    Key      Running
------    ---      -------
myHost01  TSM         True
myHost02  TSM         True
myHost05  TSM         True
myHost05  TSM-SSH     True

The TSM service is the local TSM or "ESXi Shell" service, and the TSM-SSH service is "SSH" service.  How does that do for you?

View solution in original post

0 Kudos
1 Reply
mattboren
Expert
Expert
Jump to solution

Hello, nareshunik-

Thanks to the handy Get-VMHostService cmdlet, you can get this info pretty easily:

Get-VMHost | Get-VMHostService | ?{"TSM","TSM-SSH" -contains $_.Key -and $_.Running} | Select VMHost,Key,Running

The output is something like:

VMHost    Key      Running
------    ---      -------
myHost01  TSM         True
myHost02  TSM         True
myHost05  TSM         True
myHost05  TSM-SSH     True

The TSM service is the local TSM or "ESXi Shell" service, and the TSM-SSH service is "SSH" service.  How does that do for you?

0 Kudos