## 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

Name | Type | Description | Required? | Pipeline Input | Default Value
--- | --- | --- | --- | --- | ---
HostService | HostService[] | Specifies the host service you want to update. | true | true (ByValue)
Policy | HostServicePolicy | Specifies an activation policy for the host service. | true | false
Confirm | SwitchParameter | If 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. | false | false
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false

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.