Get-VMHostService

Synopsis

Retrieves information of a host service.

Syntax

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

Related Commands

Set-VMHostService
Start-VMHostService
Stop-VMHostService
Restart-VMHostService

Detailed Description

Retrieves information of 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

NameDescriptionRequired?Pipeline InputDefault Value
VMHostSpecify hosts for which you want to retrieve the available services.truetrue (ByValue)
ServerSpecify the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.falsefalse
RefreshIndicate whether the cmdlet refreshes the service information before retrieving it.falsefalse

Input Type

object[]

Return Type

VMware.VimAutomation.Types.Host.HostService

Notes

Examples

--------------  Example 1 --------------

C:\PS>Get-VMHostService -Refresh


Refresh and retrieves the virtual machine host services on the default server.


Key Label Policy Running Required
--- ----- ------ ------- --------
ntpd NTP Daemon automatic False False
sshd SSH Server automatic True False
vmware-vpxa VMware VirtualCenter Agent automatic True False

Copyright © 1998 - 2009 VMware, Inc. All rights reserved.