## PowerCLI Reference

# Update-Entity

## Synopsis

This cmdlet remediates an inventory object against the specified baselines.

Syntax

Update-Entity [-Server <VIServer[]>] -Entity <InventoryItem> -Baseline <Baseline[]> [-ExcludePatch <Patch[]>] [-GuestCreateSnapshot [<Boolean>]] [-GuestKeepSnapshotHours <Int32>] [-GuestTakeMemoryDump [<Boolean>]] [-GuestSnapshotName <String>] [-GuestSnapshotDescription <String>] [-HostRetryDelaySeconds <Int32>] [-HostNumberOfRetries <Int32>] [-HostFailureAction <HostRemediationFailureAction>] [-HostPreRemediationPowerAction <HostPreRemediationPowerAction>] [-HostDisableMediaDevices [<Boolean>]] [-HostIgnoreThirdPartyDrivers [<Boolean>]] [-HostEnablePXEbootHostPatching [<Boolean>]] [-ClusterDisableDistributedPowerManagement [<Boolean>]] [-ClusterDisableHighAvailability [<Boolean>]] [-ClusterDisableFaultTolerance [<Boolean>]] [-ClusterEnableParallelRemediation [<Boolean>]] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Test-Compliance

Detailed Description

This cmdlet remediates an inventory object against the specified baselines. If RunAsync is set, returns a task that can be used to monitor the remediation progress. You can remediate Template, VirtualMachine, VMHost, Cluster, Datacenter, Folder, and VApp objects.

Parameters

Name | Description | Required? | Pipeline Input | Default Value
--- | --- | --- | --- | ---
Server | Specifies the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. | false | false |
Entity | Specifies a Template, VirtualMachine, VMHost, Cluster, Datacenter, Folder, or VApp object to remediate. | true | true (ByValue) |
Baseline | Specifies the baseline you want to use for the remediation. | true | true (ByValue) |
ExcludePatch | Specifies the patches you want to exclude from the remediation process. | false | true (ByValue) |
GuestCreateSnapshot | Indicates that you want to create a snapshot before initializing remediation. | false | false |
GuestKeepSnapshotHours | Specifies how long (in hours) you want to keep the snapshot. If not set, the snapshots are never deleted. | false | false |
GuestTakeMemoryDump | Indicates that you want the guest to take a memory dump while creating a snapshot. | false | false |
GuestSnapshotName | Specifies a name for the snapshot you want to create before initializing remediation. This parameter is valid only if the GuestCreateSnapshot parameter is set. | false | false |
GuestSnapshotDescription | Specifies a description for the snapshot you want to create before initializing remediation. This parameter is valid only if the GuestCreateSnapshot parameter is set. | false | false |
HostRetryDelaySeconds | Specifies how long (in seconds) to wait for the host to enter a maintenance mode. | false | false |
HostNumberOfRetries | Specifies how many times to retry to set the host into a maintenance mode. | false | false |
HostFailureAction | Specifies an action in case the host cannot be placed in a maintenance mode. This might happen due to running virtual machines that cannot be automatically migrated to another host. The valid values are FailTask, Retry, PowerOffVMsAndRetry, and SuspendVMsAndRetry. | false | false |
HostPreRemediationPowerAction | Specifies an action before trying to enter the host into a maintenance mode. The valid values are PowerOffVMs, SuspendVMs, and DoNotChangeVMsPowerState. | false | false |
HostDisableMediaDevices | Indicates that you want to temporarily disable any media devices that might prevent the specified hosts from entering maintenance mode. | false | false |
HostIgnoreThirdPartyDrivers | Indicates that you want to ignore installed third-party software that is incompatible with the upgrade. | false | false |
HostEnablePXEbootHostPatching | Indicates that you want to enable PXE booted ESXi hosts patching. | false | false |
ClusterDisableDistributedPowerManagement | Indicates that you want to temporarily disable Distributed Power Management (DPM) for the specified clusters. After the remediation, DPM is automatically re-enabled. | false | false |
ClusterDisableHighAvailability | Indicates that you want to temporarily disable High Availability (HA) for the specified clusters. After the remediation, HA is automatically re-enabled. | false | false |
ClusterDisableFaultTolerance | Indicates that you want to temporarily disable Fault Tolerance (FT) for the specified clusters. After the remediation, FT is automatically re-enabled. | false | false |
ClusterEnableParallelRemediation | Indicates that you want to enable parallel remediation for the specified clusters. | false | false |
RunAsync | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the -RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
WhatIf | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |
Confirm | Indicates that the cmdlet asks for confirmation before running. | false | false |

Return Type

VMware.VimAutomation.Types.Task[] or null If RunAsync is set, the return value is a Task object representing the remediation task on the vSphere server. If RunAsync is not set, no value is returned.

Notes

Examples

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

    Update-Entity -Baseline $baseline -Entity $vmhost -RunAsync -Confirm $false

Remediates a host in asynchronous mode.

-------------- Example 2 --------------

    Update-Entity -Baseline $vmHardwareUpgradeBaseline -Entity $vm -GuestCreateSnapshot:$true

Upgrades a virtual machine with the latest virtual hardware. If the upgrade fails, the command creates a snapshot of the target virtual machine.

-------------- Example 3 --------------

    Update-Entity -Baseline $baseline -Entity $cluster -ClusterDisableDistributedPowerManagement:$true -ClusterDisableFaultTolerance:$true -ClusterDisableHighAvailability:$true

Remediates a cluster with DPM, HA, and FT that are enabled and need to be disabled during the remediation process.

-------------- Example 4 --------------

    Update-Entity -Baseline $baseline -Entity $cluster -ClusterEnableParallelRemediation:$true

Remediates a cluster in parallel mode. All hosts in the cluster are remediated simultaneously and that saves time.

-------------- Example 5 --------------

    Update-Entity -Baseline $baseline -Entity $vmhost -HostIgnoreThirdPartyDrivers:$true

Remediates a host with preinstalled third-party drivers, which prevent host from upgrade.

Copyright © 1998 - 2015 VMware, Inc. All rights reserved.