Set-SCComplianceStatus
设置符合性状态对象。
语法
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>]
说明
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变量中。
第三个命令获取名为安全基线的基线,并将对象存储在$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) 提示的 ID。 这允许审核 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
指示作业以异步方式运行,以便控件立即返回到命令 shell。
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 对象。