Syntax
Get-VMHostService [-VMHost] <VMHost[]> [-Refresh] [-Server <VIServer[]>] [<CommonParameters>]Related Commands
Online versionDetailed Description
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.Parameters
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
VMHost | VMHost[] | Specifies hosts for which you want to retrieve the available services. | true | true (ByValue) | |
Refresh | SwitchParameter | Indicates whether the cmdlet refreshes the service information before retrieving it. | false | false | |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no 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. | false | false |
Return Type
Zero or more HostService objectsNotes
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.