Skip to content

Install software from task sequence to specific collection

Featured Replies

I apologize if there is something on this site about this. I've searched and searched but cannot find an answer. I have several printer deployments that are packages. I've also created collections for each department. I want to add all of the printer packages to my task sequence then add a condition to install a specific printer for a specific collection that the object is a member of. I've searched the internet but cannot seem to find a solution. I know that I can add a variable to the collection but since I want to automate the process that really isn't an option. What I've done so far is add a if statement followed by a WMI Query. I added the Query and tested but I get a "contains invalid syntax" error message followed by "Porrible reason: Invalid query. Basically the query should check the collection membership based on the computer name. At this point I don't even know if this is possible. Has anyone ever tried something like this? Are my commands wrong? I've also included my query below.

 

 

 

SELECT * FROM Win32_ComputerSystem WHERE Name = SMS_R_System.Name in (select sys.resourceid from SMS_CM_RES_COLL_"CollectionName" AS coll, sms_r_system as sys where sys.resourceid = coll.resourceid)

 

 

 

Any help will be appreciated.

  • Author

Okay I'm new to this so I apologize in advance. I created a test query that returns the object in that particular collection. However I used this query in the task sequence and it failed. I think the reason that it failed is because it's not calling the name from the local computer. That's why I added FROM Win32_ComputerSystem. I'm wondering how I can call the local computer name and check the specified collection for that computer name.

 

 

select SMS_R_System.Name from SMS_R_System where SMS_R_System.Name in (select sys.resourceid from SMS_CM_RES_COLL_"CollectionName" AS coll, sms_r_system as sys where sys.resourceid = coll.resourceid)

  • Author

Basically I want to query a collection from the task sequence in SCCM 2012. Has anyone done that?

  • 1 year later...

Okay I'm new to this so I apologize in advance. I created a test query that returns the object in that particular collection. However I used this query in the task sequence and it failed. I think the reason that it failed is because it's not calling the name from the local computer. That's why I added FROM Win32_ComputerSystem. I'm wondering how I can call the local computer name and check the specified collection for that computer name.

 

 

select SMS_R_System.Name from SMS_R_System where SMS_R_System.Name in (select sys.resourceid from SMS_CM_RES_COLL_"CollectionName" AS coll, sms_r_system as sys where sys.resourceid = coll.resourceid)

 

Any news on your side for this topic? Did you found another way to make it work?

 

I have the same issue here.

 

I want in a Task Sequence to install application base on the membership of the machine in differents collections.

 

Thanks

 

Carl

 

Carl

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.