Obtain Target List computers via PowerShell?

Comments

4 comments

  • Colby Bouma

    You are correct. PDQDeploy.exe does not have a command to retrieve members of a Target List. I recommend creating a Schedule with the desired Target List and starting it with StartSchedule.

    1
    Comment actions Permalink
  • David Oberst

    But a Schedule is a predetermined combination of package(s) and targets (at best, the targets are dynamically calculated from a static list of Target Lists, AD groups etc)?  We are trying to take a package of our choosing, and deploy it to a list of targets that we build.  The targets from a Target List may only be part of the target list we build.  

    It is a shame that there is no such GetTargetListComputers - it seems very symmetric to GetCollectionComputers, and there's no architectural reason or anything preventing a putative command like this from doing the calculation of the targets and returning a flat list in same way?  

    Even an additional "-TargetList" option to "PDQDeploy Deploy" would be helpful, to deploy against a Target List instead of a list of names.

    Out of curiosity, can a PowerShell Step in a deploy package (which runs on the target computer) request package deploys?  Can the Step's script do anything like "PDQDeploy Deploy -Package "AnotherPackage"" to request a package be deployed to itself?

    1
    Comment actions Permalink
  • Colby Bouma

    But a Schedule is a predetermined combination of package(s) and targets (at best, the targets are dynamically calculated from a static list of Target Lists, AD groups etc)? We are trying to take a package of our choosing, and deploy it to a list of targets that we build. The targets from a Target List may only be part of the target list we build.

    In that case, I'd recommend avoiding Target Lists altogether and only using Collections.

    It is a shame that there is no such GetTargetListComputers - it seems very symmetric to GetCollectionComputers, and there's no architectural reason or anything preventing a putative command like this from doing the calculation of the targets and returning a flat list in same way?

    PDQ just never wrote a command for it. It should absolutely be possible, but they already have a lot of their plate.

    Out of curiosity, can a PowerShell Step in a deploy package (which runs on the target computer) request package deploys? Can the Step's script do anything like "PDQDeploy Deploy -Package "AnotherPackage"" to request a package be deployed to itself?

    Not natively. You'd have to do something like this: https://www.pdq.com/blog/mdt-imaging-in-pdq-deploy/

    1
    Comment actions Permalink
  • David Oberst

    I guess from my limited exposure to PDQ (mainly the docs) I'd been thinking of collections as lists filtered on things like apps installed, etc.  But I see there is a Static Collection which looks like it could just be an arbitrary list of computers, so that's effectively a Target List, and that may be an okay workaround.  Thanks.

    1
    Comment actions Permalink

Please sign in to leave a comment.