< Back

Get-VMHostService

Sun Jan 19, 2020 6:56 pm

NAME Get-VMHostService



SYNOPSIS

This cmdlet retrieves information about a host service.





SYNTAX

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





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

-Refresh [<SwitchParameter>]

Indicates whether the cmdlet refreshes the service information before retrieving it.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? 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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? true



-VMHost <VMHost[]>

Specifies hosts for which you want to retrieve the available services.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? true



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

Zero or more HostService objects







NOTES









-------------------------- 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 LINKS

Online Version: https://code.vmware.com/doc/preview?id= ... rvice.html

Set-VMHostService

Start-VMHostService

Stop-VMHostService

Restart-VMHostService