Dela via


Set-SCComplianceStatus

Sets a compliance status object.

Syntax

Default (Default)

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

AddExemption

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

RemoveExemption

Set-SCComplianceStatus
    [-ComplianceStatus] <ComplianceStatus>
    -Baseline <Baseline>
    -Update <SoftwareUpdate>
    [-VMMServer <ServerConnection>]
    [-RemoveExemption]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<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.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AddExemption
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Baseline

Specifies a Virtual Machine Manager (VMM) baseline object.

Parameter properties

Type:Baseline
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:ComplianceStatus
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-ExemptionNote

Specifies a business reason for the exempted update.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AddExemption
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-JobVariable

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PROTipID

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

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RemoveExemption

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

RemoveExemption
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RunAsynchronously

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Update

Specifies a software update object.

Parameter properties

Type:SoftwareUpdate
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-VMMServer

Specifies a VMM server object.

Parameter properties

Type:ServerConnection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

ComplianceStatus

This cmdlet returns a ComplianceStatus object.