Jump to content


roharris33

Install software from task sequence to specific collection

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.