Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 210400

Re: List ssh settings with PowerCLI

$
0
0

julienvarela is correct, "on" represents "Start and stop with host".

 

Here is the summary of the policy field:

  • on = Start and stop with host
  • off = Start and stop manually
  • automatic = Start automatically if any ports are open, and stop when all ports are closed

 

If you don't like the warding, on/off/automatic, you can try the following:

 

Get-VMHostService -VMHost $esxi | Where-Object {$_.Key -match "TSM-SSH|NTP"} | Select-Object @{N="Service";E={$_.Label}}, @{N="Policy";E={ switch ($_.Policy) { "off" { "Start and stop manually"} "on" { "Start and stop with host" } "automatic" { "Start automatically if any ports are open, and stop when all ports are closed" }}}}

 

Sample Output:

"Service","Policy"

"SSH","Start automatically if any ports are open, and stop when all ports are closed"

"NTP Daemon","Start and stop with host"

 

Hope this helps,

Steven.


Viewing all articles
Browse latest Browse all 210400

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>