The Set-SCComplianceStatus cmdlet modifies a compliance status object.
For more information about Set-SCComplianceStatus, type: "Get-Help Set-SCComplianceStatus -online".
Parameters
ComplianceStatus
Required?
true
Accept Pipeline Input?
true (ByValue)
Position?
0
Specifies a compliance status object. The compliance status of an object indicates the object's compliance to the baselines to which the object is assigned.
AddExemption
Required?
true
Accept Pipeline Input?
false
Position?
named
Adds an exemption to an update that is part of a baseline.
Baseline
Required?
true
Accept Pipeline Input?
true (ByValue)
Position?
named
Specifies a VMM baseline object.
ExemptionNote
Required?
false
Accept Pipeline Input?
false
Position?
named
States a business reason for the exempted update.
JobVariable
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies that job progress is tracked and stored in the variable named by this parameter.
PROTipID
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.
RunAsynchronously
Required?
false
Accept Pipeline Input?
false
Position?
named
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
Update
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies a software update object.
VMMServer
Required?
false
Accept Pipeline Input?
true (ByValue)
Position?
named
Specifies a VMM server object.
ComplianceStatus
Required?
true
Accept Pipeline Input?
true (ByValue)
Position?
0
Specifies a compliance status object. The compliance status of an object indicates the object's compliance to the baselines to which the object is assigned.
Baseline
Required?
true
Accept Pipeline Input?
true (ByValue)
Position?
named
Specifies a VMM baseline object.
RemoveExemption
Required?
true
Accept Pipeline Input?
false
Position?
named
Removes an exemption from an update that is part of a baseline.
JobVariable
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies that job progress is tracked and stored in the variable named by this parameter.
PROTipID
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.
RunAsynchronously
Required?
false
Accept Pipeline Input?
false
Position?
named
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
Update
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies a software update object.
VMMServer
Required?
false
Accept Pipeline Input?
true (ByValue)
Position?
named
Specifies a VMM server object.
Examples
1: Add an exemption to a compliance
status.
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."
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 VMHost01 and stores the staus object in the $Compliance variable.
The third command gets the baseline named Security Baseline and stores the object in the $Baseline variable.
The fourth command gets the security bulletin update MS05-055 and stores the update object in the $Update variable.
The last command adds an exemption to the update MS05-055 that is part of the Security Baseline baseline, and an exemption note with a business reason for the exemption.