Set-SCComplianceStatus

Sets a compliance status object.

Syntax

Set-SCComplianceStatus [-ComplianceStatus] <ComplianceStatus> [-AddExemption] -Baseline <Baseline>
 [-ExemptionNote <String>] [-JobVariable <String>] [-PROTipID <Guid>] [-RunAsynchronously]
 -Update <SoftwareUpdate> [-VMMServer <ServerConnection>] [<CommonParameters>]
Set-SCComplianceStatus [-ComplianceStatus] <ComplianceStatus> -Baseline <Baseline> [-JobVariable <String>]
 [-PROTipID <Guid>] [-RemoveExemption] [-RunAsynchronously] -Update <SoftwareUpdate>
 [-VMMServer <ServerConnection>] [<CommonParameters>]

Description

The Set-SCComplianceStatus cmdlet sets a compliance status object.

Examples

Example 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.

Parameters

-AddExemption

Specifies an exemption to an update that is part of a baseline that this cmdlet adds.

Type:SwitchParameter
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Baseline

Specifies a Virtual Machine Manager (VMM) baseline object.

Type:Baseline
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-ComplianceStatus

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.

Type:ComplianceStatus
Required:True
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-ExemptionNote

Specifies a business reason for the exempted update.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-JobVariable

Specifies that job progress is tracked and stored in the variable named by this parameter.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PROTipID

Specifies the ID of the Performance and Resource Optimization (PRO) tip that triggered this action. This allows for auditing of PRO tips.

Type:Guid
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RemoveExemption

Specifies an exemption from an update that is part of a baseline that this cmdlet removes.

Type:SwitchParameter
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Update

Specifies a software update object.

Type:SoftwareUpdate
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Outputs

ComplianceStatus

This cmdlet returns a **ComplianceStatus** object.