vSphere PowerCLI Reference

Set-VMHostService

Synopsis

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

Modifies a host service.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
HostServiceHostService[]Specify the host service you want to update.truetrue (ByValue)
PolicyHostServicePolicySpecify 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$true
WhatIfSwitchParameterIndicate that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type

HostService

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 © 1998 - 2011 VMware, Inc. All rights reserved.