Share via


Delete Collection

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

The Delete Collection activity is used to remove an existing collection from a Configuration Manager site and optionally delete the members of that collection from the Configuration Manager database. You cannot delete a collection that is referenced by another collection (such as limiting a collection or one used in included/excluded collection rules).

For the procedure to configure this object, see: Configuring the Delete Collection 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.

Delete Collection 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 action will fail.

Collection Value Type

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

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

  • Name: the value is a collection name

Delete members from database

True or False (Default = False). When set to True, deletes all of the resources in the collection from the site database.

Advanced Tab Properties

By default, the Delete Collection activity will not remove a collection with the following properties:

  1. The collection has assigned deployments (including auto-deployments)

  2. The collection is used in any update deployment templates

  3. The collection is has custom client settings assignments

  4. The collection is has custom antimalware settings assignments

  5. The collection is a property of a query

These defaults act as a safeguard against accidentally deleting collections that are being actively used. You can override these defaults by setting the appropriate values to False.

Element Description

Has assigned deployments (including auto-deployments)

True or False (Default = True) When set to True, causes the activity to fail if the collection has any assigned deployments, including legacy programs, applications, software updates, task sequences, or auto-deployments for software updates).

Is used in any deployment templates

True or False (Default = True) When set to True, causes the activity to fail if the collection is the target assigned to a software update deployment template

Has custom client settings assignments

True or False (Default = True) When set to True, causes the activity to fail if the collection has any custom client configuration settings defined

Has antimalware policy assignments

True or False (Default = True) When set to True, causes the activity to fail if the collection has any antimalware policies assigned

Is used in any queries

True or False (Default = True) When set to True, causes the activity to fail if the collection is used as a limiting collection for any saved queries

Delete Collection Published Data

The following values are published in addition to the input values above:

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 Delete Collection Activity

To configure the Delete Collection activity

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

  2. Double-click the Delete Collection 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. Configuring the Advanced tab:

    The options in the Delete Conditions section represent a check that will be made against the collection to determine if the condition is true.

    • If an option is set to True and the condition is true, the collection will not be deleted and the activity will fail.

    • To ignore the existence of a specific condition, set that property to False.

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

  6. Click Finish.

Other Activities

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