Purpose
The Command Line Interface for PDQ Deploy and PDQ Inventory opens the door for further automation, or simply the avoidance of using the console to complete tasks.
Resolution
The shell, either Command or PowerShell, needs to be elevated and the syntax is: [Program] [Command] [Parameters]
To see the available parameters and syntax of a command, precede the command name with Help.
[Program] Help [Command]
You may also use Help with no command specified to see a list of all the available commands.
PDQ Deploy Commands:
PDQ Inventory Commands:
As an example, we'll cover deploying a package using the PDQ Deploy CLI.
To see the full syntax we will use Help and add the Deploy command.
To deploy 7-Zip to the local machine (Just using the loopback address in this example), we'll first need the full name of the package to be deployed, and may retrieve this using the GetPackagesNames command.
You'll want to make sure the package name of the computer matches exactly. In this case there are two 7-Zip packages, so we'll specify the later version of "7-Zip 21.07". Using these commands to Deploy packages using the CLI will just kick off a deployment and not wait for deployment status to be returned. If needed you can have a notification sent by using the -NotificationName parameter.
The following example shows how you can leverage both the PDQ Deploy and PDQ Inventory CLI to start a deployment to a collection of computers.
See Also
Documentation - Deploying a Package with the Command Line Interface
Blog - Adding Custom Fields to Multiple Computers with PowerShell