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

NameDescriptionRequired?Pipeline InputDefault Value
ServerSpecifies 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.falsefalse
EntitySpecifies a Template, VirtualMachine, VMHost, Cluster, Datacenter, Folder, or VApp object to remediate.truetrue (ByValue)
BaselineSpecifies the baseline you want to use for the remediation.truetrue (ByValue)
ExcludePatchSpecifies the patches you want to exclude from the remediation process.falsetrue (ByValue)
GuestCreateSnapshotIndicates that you want to create a snapshot before initializing remediation.falsefalse
GuestKeepSnapshotHoursSpecifies how long (in hours) you want to keep the snapshot. If not set, the snapshots are never deleted.falsefalse
GuestTakeMemoryDumpIndicates that you want the guest to take a memory dump while creating a snapshot.falsefalse
GuestSnapshotNameSpecifies a name for the snapshot you want to create before initializing remediation. This parameter is valid only if the GuestCreateSnapshot parameter is set.falsefalse
GuestSnapshotDescriptionSpecifies a description for the snapshot you want to create before initializing remediation. This parameter is valid only if the GuestCreateSnapshot parameter is set.falsefalse
HostRetryDelaySecondsSpecifies how long (in seconds) to wait for the host to enter a maintenance mode.falsefalse
HostNumberOfRetriesSpecifies how many times to retry to set the host into a maintenance mode.falsefalse
HostFailureActionSpecifies 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.falsefalse
HostPreRemediationPowerActionSpecifies an action before trying to enter the host into a maintenance mode. The valid values are PowerOffVMs, SuspendVMs, and DoNotChangeVMsPowerState.falsefalse
HostDisableMediaDevicesIndicates that you want to temporarily disable any media devices that might prevent the specified hosts from entering maintenance mode.falsefalse
HostIgnoreThirdPartyDriversIndicates that you want to ignore installed third-party software that is incompatible with the upgrade.falsefalse
HostEnablePXEbootHostPatchingIndicates that you want to enable PXE booted ESXi hosts patching.falsefalse
ClusterDisableDistributedPowerManagementIndicates that you want to temporarily disable Distributed Power Management (DPM) for the specified clusters. After the remediation, DPM is automatically re-enabled.falsefalse
ClusterDisableHighAvailabilityIndicates that you want to temporarily disable High Availability (HA) for the specified clusters. After the remediation, HA is automatically re-enabled.falsefalse
ClusterDisableFaultToleranceIndicates that you want to temporarily disable Fault Tolerance (FT) for the specified clusters. After the remediation, FT is automatically re-enabled.falsefalse
ClusterEnableParallelRemediationIndicates that you want to enable parallel remediation for the specified clusters.falsefalse
RunAsyncIndicates 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.falsefalse
WhatIfIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse
ConfirmIndicates that the cmdlet asks for confirmation before running.falsefalse

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.