Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

CONNECT to PI Agent

Install and configure a CONNECT to PI Agent silently

Install and configure a CONNECT to PI Agent silently

  • Last UpdatedMar 17, 2025
  • 2 minute read

There are several use cases for doing a silent installation of the CONNECT to PI Agent.

  • Silent installations are useful for automating deployments.

  • Installations of the CONNECT to PI Agent on Windows Server Core Operating System are supported only with silent installation.

To set up a new installation of a CONNECT to PI Agent without needing to run the CONNECT to PI Configuration Utility:

  1. Create a client-credentials client with an assigned role of Tenant Contributor and add a secret. See Add a client-credentials client.

    Note: Be sure to securely store the Client Id and Client Secret where you can access it again, because this is the only time you will have access to this information. You will need this information to proceed with the silent install.

  2. Find the tenantId and record it where you can access it.

    When you log into CONNECT data services, the tenantId is visible in the URL. It is the long GUID.

    https://datahub.connect.aveva.com/tenant/[YOUR TENANT ID]/dashboard

    Alternatively, select Developer Tools > API Console and the tenantId displays in the Full Path. For example:

    uswe.datahub.connect.aveva.com/api/v1/Tenants/[YOUR TENANT ID]/Namespaces

  3. Find the namespaceId and record it where you can access it.

    Select Developer Tools > API Console and select GET. The results are listed on the right-hand side of the page under the Body tab. The namespaceId appears as the Id field in the response. The namespaceId is a GUID similar to the tenantId.

    Note: If you have multiple namespaces, you will have multiple entries in this list. Be sure to select the namespaceId of the namespace where you want the CONNECT to PI Agent to retrieve data.

  4. Open a Windows command prompt as an administrator.

  5. Change to the folder where you have downloaded the CONNECT to PI Agent installation kit.

  6. Enter the following command to install the agent:

    msiexec /i CONNECTtoPIAgent_SetupKit.exe /qb- /l*v myLog.txt

  7. Enter one of the following commands, depending on your PI Web API authentication type:

    • Windows

      Aveva.DataHubToPI.ConfigurationUtility.Application.exe register --AGENTNAME="<agentName>" --CLIENTID="<clientId>" --CLIENTSECRET="<clientSecret>" --TENANTID="<tenantId>" --NAMESPACEID="<namespaceId>" --PIWEBAPIURL="<piWebApiUrl>" --PIWEBAPIAUTHENTICATIONTYPE="Windows" --AGENTSERVICEUSERNAME="<agentServiceUsername>" --AGENTSERVICEPASSWORD="<agentServicePassword>"

    • Basic

      Aveva.DataHubToPI.ConfigurationUtility.Application.exe register --AGENTNAME="<agentName>" --CLIENTID="<clientId>" --CLIENTSECRET="<clientSecret>" --TENANTID="<tenantId>" --NAMESPACEID="<namespaceId>" --PIWEBAPIURL="<piWebApiUrl>" --PIWEBAPIAUTHENTICATIONTYPE="BASIC" --PIWEBAPIBASICUSERNAME="<piWebApiBasicUsername>" --PIWEBAPIBASICPASSWORD="<piWebApiBasicPassword>" --AGENTSERVICEUSERNAME="<agentServiceUsername>" --AGENTSERVICEPASSWORD="<agentServicePassword>"

    • OpenID Connect

      Aveva.DataHubToPI.ConfigurationUtility.Application.exe register --AGENTNAME="<agentName>" --CLIENTID="<clientId>" --CLIENTSECRET="<clientSecret>" --TENANTID="<tenantId>" --NAMESPACEID="<namespaceId>" --PIWEBAPIURL="<piWebApiUrl>" --PIWEBAPIAUTHENTICATIONTYPE="OpenIDConnect" --PIWebApiClientId="<piWebApiClientId>" --PIWebApiClientSecret="<piWebApiClientSecret>" --AGENTSERVICEUSERNAME="<agentServiceUsername>" --AGENTSERVICEPASSWORD="<agentServicePassword>"

    Note: AGENTSERVICEUSERNAME and AGENTSERVICEPASSWORD specify a custom account username and password (domain\account) for the CONNECT to PI Agent service Run as user. Remove these optional parameters to set up CONNECT to PI to run as the default account (NT SERVICE\PIAdapterCONNECT). In the case that Windows PI Web API authentication type is used, this service account requires a PI or AF mapping to read/write to the PI Server.

  8. Verify your agent is successfully registered and visible in the portal by navigating to Data Collection > PI Agents page and selecting CONNECT to PI Agents from the agents dropdown selector.

TitleResults for “How to create a CRG?”Also Available in