PowerCLI Reference

Set-VMHostService

Synopsis

This cmdlet modifies a host service.

Syntax

Set-VMHostService [-HostService] <HostService[]> [-Policy] <HostServicePolicy> [-Confirm] [-WhatIf] [<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.