OSD collection script – PowerShell

Task sequence script which adds a computer to SoftwareCentral application deployment collections. It also removes a computer from one or more predefined OSD deployment collections. The script can be triggered by a Status Filter Rule in SCCM or as a “Run command line” step in an OSD task sequence.

Method 1: OSD task sequence

Create a “Run command line” task sequence step with the following command line:

Use a package which contains the ComputerCollections.ps1 script (described below)

The step must be run as an account which has sufficient permissions.

 

Method 2: Status filter rule

Configure the Status Filter Rule as shown below.

Program:

As -CollectionID you can supply one or more collection IDs separated by comma.

 

The PowerShell script used for both methods (ComputerCollections.ps1)

 

Parameters used in the script and possible values:

AssignmentType parameter (SInt32)
Type of assignment. Possible values are:
0 CIA_TYPE_DCM_BASELINE
1 CIA_TYPE_UPDATES
2 CIA_TYPE_APPLICATION
5 CIA_TYPE_UPDATE_GROUP
8 CIA_TYPE_POLICY

OfferTypeID parameter (SInt32)
Type of offer. Possible values are:
0 REQUIRED
2 AVAILABLE

CollectionType parameter (UInt32)
Count of collection variables.
0 OTHER
1 USER
2 DEVICE

Share your thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.