次の方法で共有


Add Collection Rule

Applies To: System Center 2012 - Orchestrator, System Center 2012 R2 Orchestrator, System Center 2012 SP1 - Orchestrator

The Add Collection Rule activity is used to define the membership of a collection by adding collection membership rules to the collection. Membership rules determine the resources that are included in the collection when it updates. You can use membership rules to add a specific resource or a set of resources from a query. The collection membership can also include or exclude other collections. Membership rules can add only those resources that are members of the limiting collection.

The activity allows you to use comma-separated values for direct, included collection and excluded collection rules to quickly define multiple collection rules of a single rule type without having to run the activity multiple times.

To use this activity, a collection must already exist, which can be created by the Create Collection activity. Membership rules can be removed from the collection by using the Delete Collection Rule activity. To force re-evaluation of the collection’s membership after adding or removing collection rules, use the Update Collection Membership activity.

For the procedure to configure this object, see: Configuring the Add Collection Rule Activity

Properties and Published Data

The following tables list the properties and published data for this activity. The activity publishes all the data from the required and optional properties into published data.

Add Collection Rule Properties

Element Description

Collection

The display name or ID of an existing collection.

Note

When you use the browse feature to look up a collection name, or enter a collection name manually or from published data, you must set the Collection Value Type property to Name or the activity will fail.

Collection Value Type

Specifies whether the value in the Collection property is a name or a collection ID. Options are:

  • ID (default) – the value is a collection ID

  • Name – the value is a collection name

Rule Name

The name for the rule that will be shown in the Configuration Manager console for the collection’s membership rules.

Rule Type

The type of membership rule to be added. Options are:

  • Direct Rule – a single user or computer resource

  • Query Rule – a WQL query string or a predefined query saved on the Configuration Manager server

  • Include Collection – a collection whose members will be included in this collection’s membership

  • Exclude Collection – a collection whose members will be excluded in this collection’s membership

Note

You must set the Rule Definition Value Type property to a value associated with the selected rule type or the activity will fail.

Rule Definition

How this collection rule is defined. Content depends on the Rule Type defined above. For direct and collection rules, you can enter multiple comma-separated values in this field to create multiple collection membership rules.

  • Direct Rule – user or computer resource IDs (i.e. “16777221”) or resource names.

    Device names can be the NetBIOS name or the IP Address of the device.

    User names can be the name displayed in the Configuration Manager console (i.e. “contoso\Admin (Administrator)” ), or the UniqueUserName value specified in the SMS_R_User class in WMI (i.e. “contoso\admin”) .

  • Query Rule – a valid WQL query string or the Query ID of an existing Configuration Manager Query

  • Include Collection – the name or Collection ID of a collection of the same type (user or device) as the collection specified above.

  • Exclude Collection – the name or Collection ID of a collection of the same type (user or device) as the collection specified above.

Note

You must set the Rule Definition Value Type property to a value associated with the selected rule type and the type of value in this property or the activity will fail.

Rule Definition Value Type

Specifies how to define the value in the Rule Definition property. Options are:

  • Resource IDs – used for Direct rules

  • Resource Names – used for Direct rules

  • Query ID – used for Query rules

  • Query String – used for Query rules

  • Collection IDs – used for Include/Exclude rules

  • Collection Names – used for Include/Exclude rules

Add Collection Rule Published Data

Element Description

Connection

Specifies the name of the connection to the Configuration Manager server

Collection ID

Provides the Collection ID value for the collection targeted for this activity (in case the collection name was specified for the input property).

Configuring the Add Collection Rule Activity

To configure the Add Collection Rule activity

  1. From the Activities pane, drag a Add Collection Rule activity to the active runbook.

  2. Double-click the Add Collection Rule activity icon. The Properties dialog box opens.

  3. Configuring the Details tab:

    1. In the Connection section, click the ellipsis button (...), and then select the Configuration Manager server connection that you want to use for this activity. Click OK.

    2. In the Fields section, enter a value for each of the required properties. If the property is Lookup-enabled, you can click the ellipsis (…) button next to the text box to browse for a value.

      You can also use published data to automatically populate the value of the property from the data output by a previous activity in the runbook.

  4. For information about the settings on the General and Run Behavior tabs, see Common Configuration Instructions for All Activities.

  5. Click Finish.

Other Activities

The Integration Pack for System Center Configuration Manager integration contains the following additional activities: