共用方式為


Set-SCBaseline

Modifies a baseline by adding or removing updates or assignment scopes.

Syntax

Default (Default)

Set-SCBaseline
    [-VMMServer <ServerConnection>]
    [-Baseline] <Baseline>
    [-Name <String>]
    [-Description <String>]
    [-AddUpdates <System.Collections.Generic.List`1[Microsoft.SystemCenter.VirtualMachineManager.SoftwareUpdate]>]
    [-RemoveUpdates <System.Collections.Generic.List`1[Microsoft.SystemCenter.VirtualMachineManager.SoftwareUpdate]>]
    [-AddAssignmentScope <IBaselineAssignmentScope>]
    [-RemoveAssignmentScope <IBaselineAssignmentScope>]
    [-JobGroup <Guid>]
    [-StartNow]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

Description

The Set-SCBaseline cmdlet modifies a baseline by adding or removing updates or assignment scopes. A baseline is a list of updates which, together with scope assignments, can grade the compliance of required updates for Virtual Machine Manager (VMM) fabric servers.

Examples

Example 1: Modify an existing baseline by adding updates and an assignment scope

PS C:\> $Cluster = Get-SCVMHostCluster -Name "Cluster01"
PS C:\> $Baseline = Get-SCBaseline -Name "Security Baseline"
PS C:\> $Update = Get-SCUpdate -SecurityBulletinId "MS05-055"
PS C:\> Set-SCBaseline -Baseline $Baseline -AddUpdates $Update -AddAssignmentScope $Cluster

The first command gets the cluster object named Cluster01 and stores the object in the $Cluster variable.

The second command gets the baseline object named Security Baseline and stores the object in the $Baseline variable.

The third command gets the security bulletin update object named MS05-051 and stores the object in the $Update variable.

The last command adds the update stored in $Update (MS05-051) to the baseline stored in $Baseline (Security Baseline) and sets the assignment scope to the object stored in $Cluster (Cluster01).

Example 2: Remove an update and an assignment scope from an existing baseline

PS C:\> $Cluster = Get-SCVMHostCluster -Name "Cluster01"
PS C:\> $Baseline = Get-SCBaseline -Name "Security Baseline"
PS C:\> $Update = Get-SCUpdate -SecurityBulletinId "MS05-055"
PS C:\> Set-SCBaseline -Baseline $Baseline -RemoveUpdates $Update -RemoveAssignmentScope $Cluster

The first command gets the cluster object named Cluster01 and stores the object in the $Cluster variable.

The second command gets the baseline object named Security Baseline and stores the object in the $Baseline variable.

The third command gets the security bulletin update object named MS05-051 and stores the object in the $Update variable.

The last command removes the update stored in $Update (MS05-051) from the baseline stored in $Baseline (Security Baseline) and removes the assignment scope stored in $Cluster (Cluster01).

Parameters

-AddAssignmentScope

Specifies an array of virtual machine hosts or clusters that this cmdlet adds to a baseline assignment scope.

Parameter properties

Type:IBaselineAssignmentScope
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

-AddUpdates

Specifies software updates to add to a baseline.

Parameter properties

Type:

System.Collections.Generic.List`1[Microsoft.SystemCenter.VirtualMachineManager.SoftwareUpdate]

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

-Baseline

Specifies a VMM baseline object.

Parameter properties

Type:Baseline
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

-Description

States a description for the specified object.

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

-JobGroup

Specifies an identifier for a series of commands that will run as a set just before the final command that includes the same job group identifier runs.

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

-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

-Name

Specifies the name of a VMM object.

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 tip (PRO tip) that triggered this action. This parameter lets you audit 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

-RemoveAssignmentScope

Specifies a scope. This cmdlet removes one or more VMMManagedComputer, VMHostCluster, or VMHostGroup objects from a baseline assignment scope.

Parameter properties

Type:IBaselineAssignmentScope
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

-RemoveUpdates

Specifies software updates to remove from a baseline.

Parameter properties

Type:

System.Collections.Generic.List`1[Microsoft.SystemCenter.VirtualMachineManager.SoftwareUpdate]

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

-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

-StartNow

Identifies the last command of a jobgroup and starts running the commands within the jobgroup. This parameter must be used with the JobGroup parameter.

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

-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

Baseline

This cmdlet returns a Baseline object.