Start-SCUpdateRemediation
Initiates the action of installing one or more updates on a managed server that are required from an assigned baseline.
Syntax
Start-SCUpdateRemediation
[-VMMServer <ServerConnection>]
-VMHostCluster <HostCluster>
[-Baseline <Baseline>]
[-Updates <System.Collections.Generic.List`1[Microsoft.SystemCenter.VirtualMachineManager.SoftwareUpdate]>]
[-SuspendReboot]
[-UseLiveMigration]
[-BypassMaintenanceModeCheck]
[-RemediateAllClusterNodes]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Start-SCUpdateRemediation
[-VMMServer <ServerConnection>]
-VMHostCluster <HostCluster>
[-Baseline <Baseline>]
[-Updates <System.Collections.Generic.List`1[Microsoft.SystemCenter.VirtualMachineManager.SoftwareUpdate]>]
[-SuspendReboot]
-JobGroup <Guid>
-VMHost <Host>
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Start-SCUpdateRemediation
[-VMMServer <ServerConnection>]
-VMHostCluster <HostCluster>
[-UseLiveMigration]
[-BypassMaintenanceModeCheck]
-JobGroup <Guid>
[-StartNow]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Start-SCUpdateRemediation
[-VMMServer <ServerConnection>]
[-Baseline <Baseline>]
[-Updates <System.Collections.Generic.List`1[Microsoft.SystemCenter.VirtualMachineManager.SoftwareUpdate]>]
[-SuspendReboot]
[-JobGroup <Guid>]
[-StartNow]
[-EnableMaintenanceMode]
-VMMManagedComputer <VMMManagedComputer>
[-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.
Type: | Baseline |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | 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.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | 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.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | 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.
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobVariable
Specifies that job progress is tracked and stored in the variable named by this parameter.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | 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.
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RemediateAllClusterNodes
Indicates that update remediation is performed on all nodes of a cluster.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-RunAsynchronously
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | 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.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SuspendReboot
Indicates that the computer that is being updated will not reboot when a reboot is required by a software update.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Updates
Specifies one or more software updates.
Type: | System.Collections.Generic.List`1[Microsoft.SystemCenter.VirtualMachineManager.SoftwareUpdate] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-UseLiveMigration
Indicates that live migration is used during a cluster remediation.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | 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.
Type: | Host |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMHostCluster
Specifies a VMM host cluster object.
Type: | HostCluster |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VMMManagedComputer
Specifies a computer object that is managed by VMM.
Type: | VMMManagedComputer |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VMMServer
Specifies a VMM server object.
Type: | ServerConnection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Outputs
ComplianceStatus
This cmdlet returns a ComplianceStatus object.