Delete Collection
Applies To: System Center 2012 - Orchestrator, 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. This activity treats every instance of a collection with a unique parent separately. When you specify the collection and the parent of the collection, only those collection instances with the specified parent are deleted. The Delete Collection activity also performs the following actions:
Deletes all information associated with the collection, including any advertisements, collection variables, maintenance windows, and other collection-specific properties.
Deletes any subcollections that are contained by the deleted collection.
By default, the Delete Collection activity will not remove a collection with the following properties:
The collection has subcollections
The collection has assigned advertisements
The collection has assigned update deployments
The collection is used in any Desired Configuration Baseline configurations
The collection is a property of a query
The collection is used in any other collections’ membership rules
These defaults act as a safeguard against accidentally deleting collections. You can override these defaults by deselecting the appropriate check boxes on the Advanced tab of the activity.
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.
Delete Collection Properties
Element | Description | Valid Values | Look up |
---|---|---|---|
Collection |
The name or ID of an existing collection. 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. |
String |
Yes (for collection names) |
Collection Value Type |
Specifies whether the value in the Collection property is a collection name or a collection ID |
ID Name |
Yes |
Parent Collection |
The name or ID of the parent of the collection being deleted, or Root Collection (Name), or COLLROOT (ID) if the collection to be deleted is at the root level. 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. |
String Default: COLLROOT |
Yes (for collection names) |
Parent Collection Value Type |
Specifies whether the value in the Parent Collection property is a collection name or a collection ID |
ID Name |
Yes |
Delete Collection Published Data
Element | Description | Value Type |
---|---|---|
Collection |
The name or collection ID of the collection that was deleted |
String |
Collection Value Type |
Specifies whether the value in the Collection property is a collection name or a collection ID |
String |
Connection |
Specifies the name of the connection to the Configuration Manager server |
String |
Don’t delete - advertisements |
Specifies whether the has assigned advertisements option was selected |
True or False |
Don’t delete - baselines |
Specifies whether the is used in any baselines option was selected |
True or False |
Don’t delete - deployments |
Specifies whether the has assigned update deployments option was selected |
True or False |
Don’t delete - membership rules |
Specifies whether the is used in any membership rules option was selected |
True or False |
Don’t delete - queries |
Specifies whether the is used in any queries option was selected |
True or False |
Don’t delete - subcollections |
Specifies whether the has subcollections option was selected |
True or False |
Parent Collection |
The name or collection ID of the deleted collection’s parent, or Root Collection (Name) or COLLROOT (ID) if the collection is at the root |
String |
Parent Collection Value Type |
Specifies whether the value in the Parent Collection property is a collection name or a collection ID |
String |
Configuring the Delete Collection Activity
To configure the Delete Collection activity
From the Activities pane, drag a Delete Collection activity to the active runbook.
Double-click the Delete Collection activity icon. The Properties dialog box opens.
Configuring the Details tab:
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.
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.
Important
Confirm that the Value Type properties are set correctly for the activity.
If you use the browse button to look up a collection name or parent collection name, be sure to set the values for Collection Value Type and Parent Collection Value Type to Name. If the activity is looking for an ID using a Name, the collection will not be deleted. The error message reports that the activity "Failed to delete collection <collection name>. Collection <collection name> with parent <parent collection name> does not exist.” The error message does not indicate that the true cause of the failure to delete the collection was a mismatch between a specified Name and a Value Type of ID.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.
To use published data
Right-click the property value box, click Subscribe, and then click Published Data.
Click the Activity drop-down box and select the activity from which you want to obtain the data.
To view additional data elements common across the runbook, select Show Common Published Data.
Click the published data element you want to use, and then click OK.
For a list of the data elements published by each activity, see the Published Data tables in the activity topic. For information about the Common Published Data items, see Published Data in the System Center Orchestrator 2012 Runbook Guide.
Configuring the Advanced tab:
The options in the Delete Effects section represent a check that will be made against the collection to determine if the condition is true.
If an option is selected and the condition is true, the collection will not be deleted and the activity will fail.
To ignore the existence of a specific condition, clear the check box next to that item.
For information about the settings on the General and Run Behavior tabs, see Common Configuration Instructions for all Activities.
Click Finish.
Other Activities
The Integration Pack for System Center Configuration Manager contains the following additional activities: