PowerCLI Reference

Restart-VMHostService

Synopsis

This cmdlet restarts the specified host services.

Syntax

Restart-VMHostService [-HostService] <HostService[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHostService
Set-VMHostService
Start-VMHostService
Stop-VMHostService

Detailed Description

This cmdlet restarts the specified host services.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
HostServiceHostService[]Specifies the host service you want to restart.truetrue (ByValue)
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 HostService objects

Notes

Examples

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

Restart-VMHostService -Service $vmHostService -Confirm:$false

Restarts a host service.


Copyright © VMware, Inc. All rights reserved.