PDQ Command Line Interface (CLI)

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:

1.png

PDQ Inventory Commands:

2.png

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.

3.png

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.

4.png

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.

5.png

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.

mceclip7.png

See Also

Documentation - Deploying a Package with the Command Line Interface

Blog - Adding Custom Fields to Multiple Computers with PowerShell

Video - PDQ Command Line Interface Best Practices

Was this article helpful?
Still have a question or want to share what you have learned? Visit our Community Discord to get help and collaborate with others.