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