Delete Collection

Applies To: Opalis 6.3

The Delete Collection object is used to remove an existing collection from a Configuration Manager site. This object 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 object 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 object 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 object.

For the procedure to configure this object, see: Configuring the Delete Collection Object.

Properties and Published Data

The following tables list the properties and published data for this object.

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 Object

To configure the Delete Collection object

  1. From the Objects pane, drag a Delete Collection object to the active policy.

  2. Double-click the Delete Collection object 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 object. 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.

      Important

      Confirm that the Value Type properties are set correctly for the object.

      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 object is looking for an ID using a Name, the collection will not be deleted. The error message reports that the object "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 object in the workflow.

      To use published data

      1. Right-click the property value box, click Subscribe, and then click Published Data.

      2. Click the Object drop-down box and select the object from which you want to obtain the data.

      3. To view additional data elements common across the policy, select Show Common Published Data.

      4. Click the published data element you want to use, and then click OK.

        For a list of the data elements published by each object, see the Published Data tables in the object topic. For information about the Common Published Data items, see the "Policy Workflow Rules" chapter of the Opalis Integration Server Client User Guide (https://go.microsoft.com/fwlink/?LinkId=205284).

  4. 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 object will fail.

    • To ignore the existence of a specific condition, clear the check box next to that item.

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

  6. Click Finish.

Other Objects

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