Command Line

Comments

9 comments

  • Stephen Valdinger

    You could do it with some powershell. I actually wrote an internal module for myself to use command-line rather than the Deploy console back before they had central server. If you'd like to check out the code you can find it here: https://github.com/steviecoaster/PSDeploy/blob/master/Deploy-Software/Deploy-Software.psm1

     

    Let me know if you need help understanding any of the Code. 

     

    Basically it gives you a menu based system to Select the Package(s) you want to deploy and to what Collection or Targets. You can scrape out whatever code you would like to do what you need. Of particular interest to you would be the call to GetCollectionTargets, and then add those targets to an array, and pass that array to the -Targets variable of pdqdeploy.exe.

    0
    Comment actions Permalink
  • Trav A. Tonsfeldt

    I tried out the module however it seems to error out when trying to start the deployment from the server

    0
    Comment actions Permalink
  • Stephen Valdinger

    Yeah, there is some special stuff you have to do on the server side first before it actual works. Has to do with the database and how it establishes connections. I linked it so you could really look at the code and see how I handled pulling things together to select my targets.

    0
    Comment actions Permalink
  • Trav A. Tonsfeldt

    Stephen,

    At this point this I am truly an notice right now with PowerShell and coding in general right now and been working on understand some stuff

    0
    Comment actions Permalink
  • Colby Bouma

    You can retrieve the members of a collection with "PDQInventory.exe GetCollectionComputers" and store that in a variable. Then you can call that variable in "PDQDeploy.exe Deploy -Package NAME -Targets $Targets". I did this with PowerShell.

    0
    Comment actions Permalink
  • Trav A. Tonsfeldt

    I saw the GetCollectionComputers from his code however i also saw that he was having to separate the machines at the same time.  This doesn't seem to work from Powershell ISE

    Now to figure out how to use this to allow 1 person at 1 machine to send multiple different messages to our workstations

    0
    Comment actions Permalink
  • Eddie Rowe

    Where are the command lines documented?  I ask because I do not see anything in the PDQ Deploy documentation and searching for "-package" does not find any hit???

     

    Found it...under manually deploying, but it was a silly picture.

     

    https://documentation.pdq.com/PDQDeploy/14.2.0.0/index.html?deploy-cli.htm

    0
    Comment actions Permalink
  • Stephen Valdinger

    I don't there's documentation further than what you've found. But it is pretty self-explanatory and easy to wrap your head around. Just give it a try a few times, swear at it, and then eventually it'll work!

    0
    Comment actions Permalink
  • Simeon Castle

    Thank you, past you! Couldn't pass lists into a variable from a CLI command... in ISE. Kept opening a new CMD process and doing nothing else in ISE. Tried it in a normal Powershell and it works perfectly. Cheers!

    0
    Comment actions Permalink

Please sign in to leave a comment.