Partilhar via


Start-SCUpdateRemediation

Initiates the action of installing one or more updates on a managed server that are required from an assigned baseline.

Syntax

VMHostCluster

Start-SCUpdateRemediation
    -VMHostCluster <HostCluster>
    [-VMMServer <ServerConnection>]
    [-Baseline <Baseline>]
    [-Updates <System.Collections.Generic.List`1[Microsoft.SystemCenter.VirtualMachineManager.SoftwareUpdate]>]
    [-SuspendReboot]
    [-UseLiveMigration]
    [-BypassMaintenanceModeCheck]
    [-RemediateAllClusterNodes]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

ClusterNodeRemediationWithJobgroup

Start-SCUpdateRemediation
    -VMHostCluster <HostCluster>
    -JobGroup <Guid>
    -VMHost <Host>
    [-VMMServer <ServerConnection>]
    [-Baseline <Baseline>]
    [-Updates <System.Collections.Generic.List`1[Microsoft.SystemCenter.VirtualMachineManager.SoftwareUpdate]>]
    [-SuspendReboot]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

ClusterRemediationWithJobgroup

Start-SCUpdateRemediation
    -VMHostCluster <HostCluster>
    -JobGroup <Guid>
    [-VMMServer <ServerConnection>]
    [-UseLiveMigration]
    [-BypassMaintenanceModeCheck]
    [-StartNow]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

VMMManagedComputer

Start-SCUpdateRemediation
    -VMMManagedComputer <VMMManagedComputer>
    [-VMMServer <ServerConnection>]
    [-Baseline <Baseline>]
    [-Updates <System.Collections.Generic.List`1[Microsoft.SystemCenter.VirtualMachineManager.SoftwareUpdate]>]
    [-SuspendReboot]
    [-JobGroup <Guid>]
    [-StartNow]
    [-EnableMaintenanceMode]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

Description

The Start-SCUpdateRemediation cmdlet initiates the action of installing one or more non-compliant updates on a managed server that are required from an assigned baseline.

Examples

Example 1: Bring a host into compliance with a specified baseline

PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost01"
PS C:\> $Compliance = Get-SCComplianceStatus -VMMManagedComputer $VMHost.ManagedComputer
PS C:\> $Baseline = Get-SCBaseline -Name "Security Baseline"
PS C:\> $Compliance = Start-SCComplianceScan -VMMManagedComputer $VMHost.ManagedComputer -Baseline $Baseline
PS C:\> Start-SCUpdateRemediation -VMMManagedComputer $VMHost.ManagedComputer -Baseline $Baseline

The first command gets the host object named VMHost01 and stores the object in the $VMHost variable.

The second command gets the compliance status for host VMHost01 and stores the status object in the $Compliance variable.

The third command gets the baseline object named Security Baseline and stores the object in the $Baseline variable.

The fourth command starts a compliance scan on VMHost01 against the Security Baseline baseline and stores the results in the $Compliance variable.

The last command starts remediation of VMHost01 to bring it into compliance with the Security Baseline baseline.

Parameters

-Baseline

Specifies a Virtual Machine Manager (VMM) baseline object.

Parameter properties

Type:Baseline
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

VMHostCluster
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
ClusterNodeRemediationWithJobgroup
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
VMMManagedComputer
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-BypassMaintenanceModeCheck

Indicates that cluster patching continues node by node even if a cluster node is already in maintenance mode. By default, cluster remediation fails if any of the cluster nodes are already in maintenance mode.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

VMHostCluster
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
ClusterRemediationWithJobgroup
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-EnableMaintenanceMode

Enables maintenance mode for a stand-alone VMM management server that also serves as a host. By default, when remediating a stand-alone host, VMM does not put it into maintenance mode.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

VMMManagedComputer
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-JobGroup

Specifies an identifier for a series of commands that run as a group just before the final command that includes the same job group identifier runs.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ClusterNodeRemediationWithJobgroup
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ClusterRemediationWithJobgroup
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-JobVariable

Specifies that job progress is tracked and stored in the variable named by this parameter.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RemediateAllClusterNodes

Indicates that update remediation is performed on all nodes of a cluster.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

VMHostCluster
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-StartNow

Identifies the last command of a jobgroup and starts running the commands within the jobgroup. This parameter must be used with the JobGroup parameter.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ClusterRemediationWithJobgroup
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SuspendReboot

Indicates that the computer that is being updated will not reboot when a reboot is required by a software update.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

VMHostCluster
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
ClusterNodeRemediationWithJobgroup
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
VMMManagedComputer
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Updates

Specifies one or more software updates.

Parameter properties

Type:

System.Collections.Generic.List`1[Microsoft.SystemCenter.VirtualMachineManager.SoftwareUpdate]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

VMHostCluster
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
ClusterNodeRemediationWithJobgroup
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
VMMManagedComputer
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-UseLiveMigration

Indicates that live migration is used during a cluster remediation.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

VMHostCluster
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
ClusterRemediationWithJobgroup
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-VMHost

Specifies a virtual machine host object. VMM supports Hyper-V hosts, VMware ESX hosts, and Citrix XenServer hosts.

For more information about each type of host, see the Add-SCVMHost cmdlet.

Parameter properties

Type:Host
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ClusterNodeRemediationWithJobgroup
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMHostCluster

Specifies a VMM host cluster object.

Parameter properties

Type:HostCluster
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

VMHostCluster
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
ClusterNodeRemediationWithJobgroup
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
ClusterRemediationWithJobgroup
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-VMMManagedComputer

Specifies a computer object that is managed by VMM.

Parameter properties

Type:VMMManagedComputer
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

VMMManagedComputer
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-VMMServer

Specifies a VMM server object.

Parameter properties

Type:ServerConnection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

ComplianceStatus

This cmdlet returns a ComplianceStatus object.