Hello!
I am trying to create a function to view the status of SSH on a set of hosts. I kinda narrowed down what I want to see with this...
$VMHost.ExtensionData.Config.Service.Service
... but that lists every service on the host, and it does not show the actual VMHost Name.
Basically I'm looking for this...
Get-HostsSSH
... to yield
Name
----
vmhost.local
Key : TSM-SSH
Label : SSH
Required : False
Uninstallable : False
Running : False
Ruleset :
Policy : off
SourcePackage : VMware.Vim.HostServiceSourcePackage
Name
___
vmhost2.local
Key : TSM-SSH
Label : SSH
Required : False
Uninstallable : False
Running : False
Ruleset :
Policy : off
SourcePackage : VMware.Vim.HostServiceSourcePackage
(Get-VMHost | Get-VmHostService | Where-Object {$_.key -eq "TSM-ssh"} | Select VMHost, Policy, Running)
(Get-VMHost | Get-VmHostService | Where-Object {$_.key -eq "TSM-ssh"} | Select VMHost, Policy, Running)
Thanks, Zsoldier. That got me what I was looking for.