Any way to add and remove from collection as part of deployment?

I have a process where I need to do a bunch of stuff let it all finish, reboot a few times, etc then later go back and do additional steps to thee same machines to complete this. While I've tried doing a sleep and some other things thee process fails out every time even though everything else is done. I am aware i can just do a continue on failure but I'd rather not for some specific reasons involving actual fails :) Is there a way instead to add systems to a static collection and remove them as part of the deployment package? Since I don;t see it in steps if there is a way I'd guess its through PowerShell which is fine.



Date Votes
  • Craig,

    It seems to me that the more elegant solution is to simply have a series of dynamic collections that filter the computers based on the results of your deployment. For example if you have a two-stage deployment where you need to do task A, wait a while, then do task B to only the computers that successfully completed task A, then just have a dynamic collection for each set of computers. Collection A contains all computers that need task A and task B and Collection B contains all computers that need just task B. This could be a sub-collection of Collection A.

    This would be easy if you are simply installing applications because you could set up filters on the collections to see if they have been installed yet, but it would be more complicated if the steps in your deployment are performing more slight changes.

    What kind of tasks are you performing in the deployment?

  • Its an upgrade from 1607 LTSB to 21H1 full. After it finishes I need to run some patches and push some registry keys to reenable the store. It's failing somewhere in the deployment process (the actual installation) though and so far its not actually failing but PDQ thinks it is. I don't want to set a 3-6 hour timeout wait either so I'd rather have it fail and set a 2nd process to check and push when things come back online. This is a slightly different than normal upgrade of Win10 because I am upgrading from LTSB we can't do some of the silent stuff (using the /PKEY switch which converts it from LTSB and keeps all apps and files won't allow it in any of the methods I have tried) so it takes an actual user to push go.

  • I would think it would be easy to create a collection containing machines that have had the first step performed, then. You can simply look at the OS version.

    As the first part of your deployment I would perform the upgrade to 21H1, then a sleep step if necessary, then perform a standard scan.

    As the second part of your deployment I would add a collection membership condition for only machines running 21H1. Then perform your patches and registry keys. If you need to be able to tell if the second part has been run you might have to add those reg keys to your scan profile or try to find out if you can scan for the existence of those patches.


Please sign in to leave a comment.

Didn't find what you were looking for?

New post