Working with host services
PowerCLI has a number of cmdlets to work with host services. You can easily find these cmdlets using the Get-Command
cmdlet:
PowerCLI C:\> Get-Command -Noun VMHostService 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
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] ...
Get Learning PowerCLI now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.