PowerCLI Reference

Set-VMHostService

Synopsis

This cmdlet modifies a host service.

Syntax

Set-VMHostService [-HostService] <HostService[]> [-Policy] <HostServicePolicy> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHostService
Start-VMHostService
Stop-VMHostService
Restart-VMHostService

Detailed Description

This cmdlet modifies a host service.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
HostServiceHostService[]Specifies the host service you want to update.truetrue (ByValue)
PolicyHostServicePolicySpecifies an activation policy for the host service.truefalse
ConfirmSwitchParameterIf the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation.falsefalse
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type

Zero or more modified HostService objects

Notes

Examples

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

Get-VMHostService -VMHost Host | Set-VMHostService -Policy "Automatic"

Sets the policy of all services the Host virtual machine host to "Automatic".


Copyright © VMware, Inc. All rights reserved.