Working with host services
PowerCLI has some cmdlets to work with host services. You can easily find these cmdlets using the Get-Command
cmdlet, as follows:
PowerCLI C:\> Get-Command -Noun VMHostService
The preceding command has the following output:
CommandType Name ModuleName ----------- ---- ---------- Cmdlet Get-VMHostService VMware.VimAutomation.Core Cmdlet Restart-VMHostService VMware.VimAutomation.Core Cmdlet Set-VMHostService VMware.VimAutomation.Core Cmdlet Start-VMHostService VMware.VimAutomation.Core Cmdlet Stop-VMHostService VMware.VimAutomation.Core
In the following sections, we will discus the *-VMHostService
cmdlets.
Retrieving information about host services
You can use the Get-VMHostService
cmdlet to retrieve information about the services running on a host.
The syntax of the Get-VMHostService
cmdlet is:
Get-VMHostService [-VMHost] <VMHost[]> [-Refresh] [-Server
<VIServer[]>] [<...