Get-VMHostService

This cmdlet retrieves information about a host service. If the Refresh parameter is set to $true, the cmdlet refreshes the host services information before retrieving it. To specify a server different from the default one, use the Server parameter.

Syntax

-VMHost  <VMHost[]>
[-Refresh]
[-Server  <VIServer[]>]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
VMHost
VMHost[] named
  • wildcards
  • pipeline
  • Specifies hosts for which you want to retrieve the available services.
    optional
    Refresh
    SwitchParameter named Indicates whether the cmdlet refreshes the service information before retrieving it.
    optional
    Server
    VIServer[] named
  • wildcards
  • Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.

    Output

    VMware.VimAutomation.ViCore.Types.V1.Host.HostService

    Examples


    Example 1

    Get-VMHostService -Refresh

    Refreshes and retrieves the host services on the default server.

    Example 2

    $vmhost = Get-VMHost -Name Host
    $vmHostService = Get-VMHostService -VMHost $vmhost

    Gets the services of the specified host.

    Related Commands

    Feedback

    Was this page helpful?