Set-SCComplianceStatus
Sets a compliance status object.
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
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 |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Baseline
Specifies a Virtual Machine Manager (VMM) baseline object.
Type: | Baseline |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
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 |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ExemptionNote
Specifies a business reason for the exempted update.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Position: | Named |
Default value: | None |
Required: | True |
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 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Update
Specifies a software update object.
Type: | SoftwareUpdate |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VMMServer
Specifies a VMM server object.
Type: | ServerConnection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Outputs
ComplianceStatus
This cmdlet returns a ComplianceStatus object.