VMware PowerCLI

The Best User Interface for your VMware Datacenter!

Make easier the getting of VMHost services by name/key -- new param for Get-VMHostService

In effort to continue to optimize the user of PowerShell/PowerCLI, let's add one or more of -Name, -Key, -Label parameters to Get-VMHostService, for getting those services by name/key, instead of a subsequent Where-Object to get just the target service(s)

Examples of current- and proposed behavior/capability:

 ## current state
 Get-VMHost myhost0.dom.com | Get-VMHostService | Where-Object {$_.Label -eq "SSH"}

 ## Proposed behavior -- more consumer friendly
 Get-VMHost myhost0.dom.com | Get-VMHostService -Name SSH
 Get-VMHost myhost0.dom.com | Get-VMHostService SSH

 

  • Matt Boren
  • Oct 26 2017
  • Attach files