Start-SCUpdateRemediation
启动在分配的基线所需的托管服务器上安装一个或多个更新的操作。
语法
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>]
说明
Start-SCUpdateRemediation cmdlet 启动在分配的基线所需的托管服务器上安装一个或多个不合规更新的操作。
示例
示例 1:使主机符合指定的基线
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
第一个命令获取名为 VMHost01 的主机对象,并将对象存储在$VMHost变量中。
第二个命令获取主机 VMHost01 的符合性状态,并将状态对象存储在$Compliance变量中。
第三个命令获取名为“安全基线”的基线对象,并将对象存储在$Baseline变量中。
第四个命令针对安全基线启动 VMHost01 上的符合性扫描,并将结果存储在$Compliance变量中。
最后一个命令开始修正 VMHost01,使其符合安全基线基线。
参数
-Baseline
指定 Virtual Machine Manager (VMM) 基线对象。
Type: | Baseline |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-BypassMaintenanceModeCheck
指示即使群集节点已处于维护模式,群集修补也会按节点继续。 默认情况下,如果任何群集节点已处于维护模式,群集修正将失败。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-EnableMaintenanceMode
为充当主机的独立 VMM 管理服务器启用维护模式。 默认情况下,修正独立主机时,VMM 不会将其置于维护模式。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-JobGroup
指定一系列命令的标识符,这些命令在包含相同作业组标识符的命令运行之前作为组运行。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobVariable
指定跟踪作业进度,并将其存储在此参数命名的变量中。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PROTipID
指定触发此操作 (PRO 提示) 的性能和资源优化提示的 ID。 此参数允许审核 PRO 提示。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RemediateAllClusterNodes
指示在群集的所有节点上执行更新修正。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-RunAsynchronously
指示作业异步运行,以便控件立即返回到命令 shell。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StartNow
标识作业组的最后一个命令,并开始在作业组中运行命令。 此参数必须与 JobGroup 参数一起使用。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SuspendReboot
指示软件更新需要重新启动时,要更新的计算机不会重新启动。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-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
指示在群集修正期间使用实时迁移。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VMHost
指定一个虚拟主机对象。 VMM 支持 Hyper-V 主机、VMware ESX 主机和 Citrix XenServer 主机。
有关每种主机类型的详细信息,请参阅 Add-SCVMHost cmdlet。
Type: | Host |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMHostCluster
指定 VMM 主机群集对象。
Type: | HostCluster |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VMMManagedComputer
指定由 VMM 管理的计算机对象。
Type: | VMMManagedComputer |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VMMServer
指定VMM 服务器对象。
Type: | ServerConnection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
输出
ComplianceStatus
此 cmdlet 返回 ComplianceStatus 对象。