Installing a PEM Agent on Windows v7

To invoke the PEM Agent installer, assume Administrative privileges and navigate into the directory that contains the installer. Then, invoke the installer with the command:


The Setup… page opens, welcoming you to the PEM Agent installer.

PEM Agent Wizard - Welcome dialog

Click Next to continue to the License Agreement.

PEM Agent Wizard - License Agreement dialog

Carefully review the license agreement before highlighting the appropriate radio button and accepting the agreement; click Next to continue to the Installation Directory dialog.

PEM Agent Wizard - Installation Directory dialog

By default, the PEM Agent is installed in the C:\Program Files (x86)\edb\pem directory.You can accept the default installation directory, or modify the contents of the Installation Directory field, specifying an alternate installation directory for the PEM agent.

By default, the PEM Agent installer places a certificate in the Administrator’s %APPDATA%\pem directory. Check the Show advanced options box to indicate that you would like the PEM agent installer to include a dialog that allows you to specify an alternate path for the certificate file.

Check the box next to Register now? to instruct the installer to register the newly installed PEM Agent with the PEM server.

Click Next to continue to the PEM Server Installation Details dialog.

PEM Agent Wizard - PEM Server Installation details dialog

Enter the connection details for the PEM server on the PEM server installation details dialog:

  • Specify the name or IP address of the system on which the PEM database server resides in the Host field. Please note: If the PEM-HTTPD web server and PEM database are hosted on different systems, you must specify the host of the PEM database.
  • Specify the name of the database superuser in the User Name field.
  • Specify the password associated with the database superuser in the Password field.
  • Specify the port that PostgreSQL is monitoring in the Port field.

Click Next to continue to pemAgent Service Account. The installer will attempt to connect to the server to verify that the details are correct.


The PEM server must allow connections from the PEM Agent installer. If you encounter a connection error, confirm the connection properties specified on the PEM Server Installation Details dialog are correct, and confirm that the pg_hba.conf file (on the PEM server) will allow a connection to the server described in the error message.

PEM Agent Wizard - pemAgent Service Account password dialog

Provide the password for the edb account under which the pemAgent service will run. The Agent certificate and key files will be created in C:\Users\edb\AppData\Roaming\pem directory. Click Next to continue to Agent Details dialog.

PEM Agent Wizard - Naming PEM Agent dialog

The tree control displayed in the Browser panel of the PEM web interface displays the value entered in the Description field to identify the PEM agent. Specify a descriptive name for the agent, such as the hostname of the machine the agent is installed on, or a name that reflects the host's functionality.

Provide a descriptive name, or accept the default provided by the PEM Agent host, and click Next to continue.

If you checked the Show advanced options checkbox, the Advanced options dialog opens.

PEM Agent Wizard - Advanced Options - Certificate Path dialog

By default, the PEM Agent installer places the certificate in the C:\Program Files (x86)\edb\pem directory. Specify an alternate path for the certificate or accept the default and click Next.

The wizard is now ready to install the PEM Agent; click Back to amend the installation directory, or Next to continue.

PEM Agent Wizard - Ready to install

Click Next on the Ready to Install dialog to instruct the installer to copy files to the system and register the Agent on the PEM server.

PEM Agent Wizard - Installation in progress

The PEM Agent installer displays progress bars to mark the PEM Agent's installation progress.

PEM Agent Wizard - Finish Installation dialog

When the installation has completed, the PEM Agent will be running and reporting operating system and host data to the PEM server. To start monitoring Postgres instances on the host of the PEM agent, they must now be added to PEM’s enterprise directory and bound to the agent.

Invoking the Agent Installer from the Command Line

The command line options of the PEM Agent installers offer functionality in situations where a graphical installation may not work because of limited resources or system configuration. You can:

  • Include the --mode unattended option when invoking the installer to perform an installation without additional user input.

Not all command line options are suitable for all platforms. For a complete reference guide to the command line options, include the --help option when you invoke the installer.

Invoking the PEM Agent Installer in Unattended Mode

You can perform an unattended PEM server installation by providing installation preferences on the command line when invoking the installer. Please note that the system on which you are installing the PEM server must have internet access.

Before invoking the PEM Agent installer in unattended mode, you must:

  • Install the PEM server; the pg_hba.conf file of the PEM server must allow connections from the host of the PEM Agent.
  • Ensure that the monitored Postgres database has SSL enabled, and is accepting connections.

You must have Administrator privileges to install the PEM Agent. Use the following command to invoke the PEM Agent installer in unattended mode:

pem-agent-7.<x>.<x>-windows-x64.exe --mode unattended
--pghost <pem_server_host_address> --pgport <pem_server_port>
--pguser postgres --pgpassword <pguser_password>
--agent_description <agent_name>


  • pem_server_host_address specifies the IP address of the host of the PEM server.
  • pem_server_port specifies the port used by the backing PEM database; by default, the database uses port 5432.
  • pguser_password specifies the password associated with the PEM database superuser.
  • agent_name specifies a descriptive name for the PEM Agent.
EnterpriseDB is the leading provider of value-added products and services for the Postgres community. Please visit our website at

When configuring a shell/batch script run by a Windows Agent that has PEM 7.11 or later version installed, the AllowBatchJobSteps parameter must be set to True in the agent.cfg file. The PEM agent will not execute any batch/shell script by default.