powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Get-VMHostService



NAME
Get-VMHostService

SYNOPSIS
Retrieves information of a host service.

SYNTAX
Get-VMHostService [-VMHost] [-Refresh] [-Server ] []


DESCRIPTION
Retrieves information of a host service. If the Refresh parameter is set to $true, the cmdlet refreshes the host se
rvices information before retrieving it. To specify a server different from the default one, use the -Server parame
ter.


PARAMETERS
-VMHost
Specify hosts for which you want to retrieve the available services.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? true

-Refresh
Indicate whether the cmdlet refreshes the service information before retrieving it.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Server
Specify the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the co
mmand runs on the default servers. For more information about default servers, see the description of Connect-V
IServer.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
HostService


NOTES




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

C:\PS>Get-VMHostService -Refresh


Refreshes and retrieves the host services on the default server.





-------------- Example 2 --------------

C:\PS>$host = Get-VMHost -Name Host

$vmHostService = Get-VMHostService -VMHost $host


Gets the services of the specified host.






RELATED LINKS
Online version: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/Get-VMHostService.html
Set-VMHostService
Start-VMHostService
Stop-VMHostService
Restart-VMHostService