Start-SCUpdateRemediation
起始在受指派基準所需的受管理伺服器上安裝一或多個更新的動作。
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
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變數中。
第三個命令會取得名為 Security Baseline 的基準物件,並將物件儲存在$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 提示 (PRO 提示的識別碼) 。 此參數可讓您稽核 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
表示作業會以非同步方式執行,讓控制項立即返回命令殼層。
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 物件。