Set-SCComplianceStatus
設定合規性狀態物件。
Syntax
Set-SCComplianceStatus
[-VMMServer <ServerConnection>]
[-ComplianceStatus] <ComplianceStatus>
-Baseline <Baseline>
-Update <SoftwareUpdate>
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Set-SCComplianceStatus
[-VMMServer <ServerConnection>]
[-ComplianceStatus] <ComplianceStatus>
-Baseline <Baseline>
-Update <SoftwareUpdate>
[-ExemptionNote <String>]
[-AddExemption]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Set-SCComplianceStatus
[-VMMServer <ServerConnection>]
[-ComplianceStatus] <ComplianceStatus>
-Baseline <Baseline>
-Update <SoftwareUpdate>
[-RemoveExemption]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Description
Set-SCComplianceStatus 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:\> $Update = Get-SCUpdate -SecurityBulletinID "MS05-055"
PS C:\> Set-SCComplianceStatus -ComplianceStatus $Compliance -Baseline $Baseline -Update $Update -AddExemption -ExemptionNote "This exemption has been signed off by the IT Manager."
第一個命令會取得名為 VMHost01 的主機物件,並將物件儲存在$VMHost變數中。
第二個命令會取得 VMHost01 的合規性狀態,並將 staus 物件儲存在 $Compliance 變數中。
第三個命令會取得名為 Security Baseline 的基準,並將物件儲存在$Baseline變數中。
第四個命令會取得安全性佈告欄更新 MS05-055,並將更新物件儲存在$Update變數中。
最後一個命令會將豁免新增至屬於安全性基準基準一部分的更新 MS05-055,以及有豁免原因的豁免附注。
參數
-AddExemption
指定這個 Cmdlet 所加入基準的更新豁免。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Baseline
指定 Virtual Machine Manager (VMM) 基準物件。
Type: | Baseline |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ComplianceStatus
指定合規性狀態物件。 物件的合規性狀態表示物件對指派物件的基準的合規性。
Type: | ComplianceStatus |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ExemptionNote
指定豁免更新的商務原因。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
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 秘訣。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RemoveExemption
指定此 Cmdlet 移除之基準的更新豁免。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RunAsynchronously
表示作業會以非同步方式執行,讓控制項立即返回命令殼層。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Update
指定軟體更新物件。
Type: | SoftwareUpdate |
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 物件。