VMware vSphere Update Manager PowerCLI

Remediate-Inventory

Synopsis

Remediates an inventory object against the specified baselines.

Syntax

Remediate-Inventory [-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

Scan-Inventory

Detailed Description

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
ServerSpecify 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
EntitySpecify a Template, VirtualMachine, VMHost, Cluster, Datacenter, Folder, or VApp object to remediate.truetrue (ByValue)
BaselineSpecify the baseline you want to use for the remediation.truetrue (ByValue)
ExcludePatchSpecify the patches you want to exclude from the remediation process.falsetrue (ByValue)
GuestCreateSnapshotIndicate that you want to create a snapshot before initializing remediation.falsefalse
GuestKeepSnapshotHoursSpecify how long (in hours) you want to keep the snapshot. If not set, the snapshots are never deleted.falsefalse
GuestTakeMemoryDumpIndicate that you want the guest to take a memory dump while creating a snapshot.falsefalse
GuestSnapshotNameSpecify a name for the snapshot you want to create before initializing remediation. This parameter is valid only if the GuestCreateSnapshot parameter is set.falsefalse
GuestSnapshotDescriptionSpecify a description for the snapshot you want to create before initializing remediation. This parameter is valid only if the GuestCreateSnapshot parameter is set.falsefalse
HostRetryDelaySecondsSpecify how long (in seconds) to wait for the host to enter a maintenance mode.falsefalse
HostNumberOfRetriesSpecify how many times to retry to set the host into a maintenance mode.falsefalse
HostFailureActionSpecify 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
HostPreRemediationPowerActionSpecify an action before trying to enter the host into a maintenance mode. The valid values are PowerOffVMs, SuspendVMs, and DoNotChangeVMsPowerState.falsefalse
HostDisableMediaDevicesIndicate that you want to temporarily disable any media devices that might prevent the specified hosts from entering maintenance mode.falsefalse
HostIgnoreThirdPartyDriversIndicate that you want to ignore installed third-party software that is incompatible with the upgrade.falsefalse
HostEnablePXEbootHostPatchingIndicate that you want to enable PXE booted ESXi hosts patching.falsefalse
ClusterDisableDistributedPowerManagementIndicate that you want to temporarily disable Distributed Power Management (DPM) for the specified clusters. After the remediation, DPM is automatically re-enabled.falsefalse
ClusterDisableHighAvailabilityIndicate that you want to temporarily disable High Availability (HA) for the specified clusters. After the remediation, HA is automatically re-enabled.falsefalse
ClusterDisableFaultToleranceIndicate that you want to temporarily disable Fault Tolerance (FT) for the specified clusters. After the remediation, FT is automatically re-enabled.falsefalse
ClusterEnableParallelRemediationIndicate that you want to enable parallel remediation for the specified clusters.falsefalse
RunAsyncIndicate 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
WhatIfIndicate that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse
ConfirmIndicate that the cmdlet asks for confirmation before running.falsefalse

Return Type

VMware.VimAutomation.Types.Task[] or null

Notes

Examples

-------------- EXAMPLE 1 --------------

Remediate-Inventory -Baseline $baseline -Entity $vmhost -RunAsync -Confirm $false

Remediates a host in asynchronous mode.

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

Remediate-Inventory -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 --------------

Remediate-Inventory -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 --------------

Remediate-Inventory -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 --------------

Remediate-Inventory -Baseline $baseline -Entity $vmhost -HostIgnoreThirdPartyDrivers:$true

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


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