Configuring Central Server - PDQ Deploy

Purpose:
You wish to configure the PDQ Deploy Central Server. If you will be converting an existing PDQ Deploy console to Client Mode and have custom packages on that console's repository and database, please check out the Migrating Custom Packages and Schedules from a Local Installation section of this article first.

Resolution:
There are three available options when configuring PDQ Deploy:

  1. Local Mode: a standalone console of PDQ Deploy with the repository installed on the same machine, using its own local database. This is the normal installation used in previous versions of PDQ Deploy.
  2. Server Mode: a console of PDQ Deploy used to house the central database and repository. Consoles in Client Mode will connect to this machine through a TCP port.
  3. Client Mode: the console(s) of PDQ Deploy used to connect to the Server's database and repository. No repository or local database is installed on this machine.

Configuring Central Server will be covered in the following topics:

Feature Overview

Setting up PDQ Deploy in Server Mode

Setting up PDQ Deploy in Client Mode

Post Installation Addenda:

Feature Overview:
Central Server addresses the need to share packages between PDQ Deploy consoles by creating a server/client relationship. In this model, the PDQ Deploy consoles in Client Mode initiate all deployments, post-deployment notifications, and Wake-on-LAN events on the PDQ Deploy console running in Server Mode, using the Server's database and repository. The PDQ Deploy console in Server Mode may also initiate deployments and all other tasks; however, they are initiated in the same way a standalone, locally-installed PDQ Deploy console would.

In the Server/Client relationship, only one server is possible, but there may be multiple client PDQ Deploy consoles. There may be multiple relationships, however, meaning an organization may have multiple server/client relationships, but those relationships are discrete (see notes at the end of this article for more information and limitations).

IMPORTANT:

  • In existing PDQ installations, PDQ Deploy consoles configured in Server Mode will retain all packages, including custom packages. On the other hand, PDQ Deploy consoles configured in Client Mode will not retain any packages, imported or custom. Please see the Central Server: Migrating Existing Installations that use Custom Packages article for instructions on how to migrate packages from Client Mode PDQ consoles to the server, paying close attention to possible issues that will need to be addressed should you export/import schedules.
  • As a corollary to the above, shared packages are also not retained between PDQ Deploy Server/Client Mode consoles. Sharing will be disabled on PDQ consoles where Server or Client Mode is selected and the packages will be retained on the console where they were created. Please see the Sharing Has Been Superseded By The New Central Server Feature article for additional information on how to migrate existing PDQ Deploy consoles.
  • You may receive a warning if the number of active sessions between the client consoles of the PDQ program exceeds the number of licenses that exist for the account. For more information on this warning, please see the Concurrent Connections Exceeded The Licensed Limit article.


Setting up PDQ Deploy Server Mode:
1. Upon installing a new PDQ Deploy console version 13 or greater, you will prompted to complete the post-installation wizard:
CS-01.png

2.
You will be prompted to enter your PDQ Deploy license, Central Server requires an Enterprise license. Enter the license or browse to the license text file and click OK.
CS-02.png

3.
Click Next on the License Key window.
CS-03.png

4.
In the Enterprise Installation Type window, select Server.
CS-04.png

5.
In the Server Network Configuration window, select the appropriate values.

  • TCP Port: By default, PDQ Deploy will use unassigned port number 6336. If you are using port 6336 within your environment, change this to an unassigned port (for example: 7777, 8181). If Windows Firewall is enabled, check the Create exception in firewall for service executable box to open up the TCP port in Windows Firewall.
  • Server IP Addresses: For a multi-homed PDQ Deploy console machine, select either Listen on all IP addresses (default) or enumerate the Server IP Addresses in the text field. Values are comma-delimited, e.g. 172.16.155.200,10.144.144.42).
  • Background Service User Credentials: These credentials are used to run the PDQ Deploy service. The user must have administrative privileges on the PDQ Deploy server console computer and any Client Mode PDQ Deploy consoles. Credentials must be entered before continuing the Initialize PDQ Deploy wizard.

CS-05.png
NOTE:
The Windows Firewall exception is equivalent to running the following command:

netsh advfirewall firewall add rule name="PDQ Deploy" dir=in action=allow program="C:\Program Files (x86)\Admin Arsenal\PDQ Deploy\PDQDeployService.exe" enable=yes localport=6336 remoteport=6336 protocol=tcp profile=any

6. Click Finish to complete the wizard.


Setting up PDQ Deploy Client Mode:

IMPORTANT: If the PDQ Deploy console will be running Client Mode and has or will have PDQ Inventory installed, PDQ Inventory must be at version 12.3 or higher. Prior versions of PDQ Inventory will not integrate with PDQ Deploy consoles running in Client Mode.

1. Upon installing a new PDQ Deploy console version 13 or greater, you will prompted to complete the post-installation wizard:
CS-01.png

2. You will be prompted to enter your PDQ Deploy license, Central Server requires an Enterprise license. Enter the license or browse to the license text file and click OK.
CS-02.png

3. Click Next on the License Key window.
CS-03.png

4. In the Enterprise Installation Type window, select Client and then Next.

IMPORTANT: In order to set up a PDQ Deploy console in Client Mode, a server PDQ Deploy console must already be configured and operational.
CS-06.png

5. In this window, type the name of the PDQ Deploy console operating in Server Mode and the port used by that server.
CS-07.png

6. Click Finish to complete the wizard.


Important Menu Changes:
Changes were made to the PDQ Deploy menu bar to include the Options menu item, which now includes the following:

  • Credentials (previously under File > Preferences > Credentials)
  • Variables (previously under File > Preferences > Variables)
  • Console Users (previously under File > Preferences > Background Service)
  • Central Server (new item with PDQ Deploy 13)
  • Background Service (previously under File > Preferences > Background Service)
  • Preferences (previously under the File menu item)

CS-08.png

Additionally, license information was moved from File > Preferences > License to the Help menu item (Help > License).
CS-09.png

These changes were made to follow industry standards and separate items that need to be saved/applied versus those that do not need to be saved in order to be applied. For example, the Options > Preferences window now contains the Save toolbar item:
CS-10.png


Background Service and Credentials:


PDQ Deploy consoles in Client Mode do not run the background service and therefore do not need access to this option. Instead, the PDQ Deploy clients use the background service running from the Server console.

When running in Server Mode, PDQ Deploy Options > Background Service shows the following window:
CS-11.png

When running in Client Mode, PDQ Deploy Options > Background Service shows the following window since the background service now runs on the PDQ Deploy server console:
CS-12.png

NOTES:

  • While the PDQ Deploy console running in Server Mode performs the majority of tasks initiated from the PDQ Deploy Client Mode consoles, certain limitations apply, such as running Remote Repair and local commands, both of which are performed by the local PDQ Deploy console.
  • It is possible to have multiple PDQ Deploy consoles operating in Server Mode, but it is not possible for a PDQ Deploy console running in Client Mode to connect to more than one server.
  • Connections from a Client to the Server, including the Server's connection to itself, are limited by the number of concurrent client connections as defined by the quantity enumerated in your Enterprise license.
  • When using PDQ Inventory 12.3, post-deployment scans will be initiated on both the PDQ Deploy Server Mode console and the Client Mode console. With PDQ Inventory 13, the post-deployment scans will only be initiated on the Server.

Migrating Custom Packages and Schedules from a Local Installation

If you have existing Local Mode installations that will be converted into Client Mode it may be necessary to export / import packages from the Local Mode installation prior to configuring an existing PDQ Deploy console to Client Mode.

Exporting Custom Packages

IMPORTANT:

  • As install files and script references in the packages might exist in several locations, check the packages to see where any files are stored. You should consider moving all locally-stored install files and scripts to the Repository (path can be found in Preferences > Repository or Options > Preferences > Repository or Ctrl+comma) prior to exporting the packages. The default location for the Repository is %PUBLIC%\Documents\Admin Arsenal\PDQ Deploy\Repository. Instructions for organizing your file paths (especially utilizing the ($Repository) variable), can be found at the end of this document.

  • These instructions intentionally leave out the exporting and importing of schedules due to the warning in the Purpose statement of this document. If you do export/import schedules, be aware imported schedules will likely need to be manually reconfigured to ensure the appropriate packages are set up to be deployed to the expected targets. Failure to do so may have unintended consequences, such as the wrong package being deployed to the wrong targets at the wrong time.

To export/import from a PDQ Deploy console that will be converted to Client Mode, perform the following (this assumes all package files and scripts are stored in the local repository):

In the main console of a PDQ Deploy installation running in Local Mode, select one, some, or all packages. You can also just select the entire package folder. Right-click the selection and click Export from the context menu.

Save the XML file in a location accessible by the PDQ Deploy console in Server Mode (e.g. a UNC share) or to external media. TIP: If you have admin access to the PDQ Deploy console that will be converted to Client Mode, you can access the C$ of the potential client from the server console of PDQ Deploy.

Exporting Custom Schedules

  • In the main console of a PDQ Deploy installation running in Local Mode, select one, some, or all schedule(s). Right-click the selection and click Export from the context menu.

  • Save the XML file in a location accessible by the PDQ Deploy console in Server Mode (e.g. a UNC share) or to external media. TIP: If you have admin access to the PDQ Deploy console that will be converted to Client Mode, you can access the C$ of the potential client from the server console of PDQ Deploy.

Importing Custom Packages and Schedules

  • Navigate to the location of the Repository on the computer that will be converted to Client Mode.

  • Place any repository files referenced by the packages you exported in the same UNC share or external media (or access the C$ from the PDQ Deploy server console). See the note at the end of this section for more information.

IMPORTANT:
If you are using DFS or other centrally-accessible UNC share, you will not need to move any files. Simply set the Repository on the PDQ Deploy in Server Mode (Options > Preferences > Repository) to point to the appropriate DFS/UNC share.

  • Login to the PDQ server console and transfer the files from the Repository into the Server's repository (Skip this step if you are using DFS or centrally accessible UNC share).
  • On the PDQ Deploy console in Server Mode, open File > Import (or Ctrl+I), navigate to the saved XML file from earlier and import the XML.
  • The packages will then be imported to the Server's package list in the navigation tree and reference the files you moved into the server's Repository, assuming they are in the correct location. All Client consoles will then have access to those packages.
  • Proceed to configure Client Mode on the PDQ Deploy console designated to be the client.
  • If a PDQ console in Client Mode needs access to any packages that exist on their local repository, it can be switched back to Local Mode, which will only use the original/local Repository and database for the Local Mode console.

NOTES:
If the file paths for your files are in disarray or otherwise not neat and tidy, you can clean that up with a little PowerShell magic and SQLite. Please see this blog post, Using PowerShell and SQLite to Update Package File Paths.

Additionally, you can use this SQL command (from the SQLIte3 prompt):

update InstallSteps set FileName = '[new path]' || substr(filename, length('[old path]') + 1) where FileName like '[old path]' || '%';

For example:

update InstallSteps set FileName = '\\Server\NewShare' || substr(filename, length('\\Server\OldShare') + 1) where FileName like '\\Server\OldShare' || '%'; 

If you have additional files listed in your packages that are not saved in your repository, you can use the following SQL command to change that (changing the paths as appropriate using the same method outlined above):

update InstallSteps set Files = (select Files from (
select PackageStepId, group_concat(part, x'0a') as Files from (
WITH RECURSIVE cte(PackageStepId, part, rest, pos) AS (
select PackageStepId, '', Files || x'0a', 0 from InstallSteps
UNION ALL
SELECT PackageStepId,
SUBSTR(rest, 1, INSTR(rest, x'0a') - 1),
SUBSTR(rest, INSTR(rest, x'0a') + 1),
pos + INSTR(rest, x'0a') + 1
FROM cte
WHERE INSTR(rest, x'0a') > 0
)
SELECT PackageStepId,
case when part like '[old path]' || '%'
then '[new path]' || substr(part, length('[old path]') + 1)
else part end as part
FROM cte
WHERE pos <> 0)
group by PackageStepId)
where PackageStepId = InstallSteps.PackageStepId);

See Also:
Article - Windows Firewall Ports and Exceptions

Article - Configuring Central Server - PDQ Inventory

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.