Run the AFDiag utility
- Last UpdatedNov 09, 2026
- 1 minute read
- PI System
- PI Server 2024 R2
- PI Server
The PI AF Diagnostics (AFDiag) utility is a command-line utility that you can use to enable or disable PI AF server features and perform other administrative functions.The utility connects directly to the associated SQL Server database and requires the sysadmin or db_AFadmin role.
The AFDiag utility is located in the \PIPC\AF folder. The AFDiag utility is accessed in a Windows Command Prompt window.
-
As an administrator, open a Windows command prompt and enter %PIHOME64%\AF or %PIHOME%\AFto navigate to the directory where the AFDiag utility is located.
Note: The PIHOME and PIHOME64 environment variables are set as part of the PI Server installation process. After installation on a 64-bit computer, both PIHOME and PIHOME64 are set.
-
Choose one of the following actions.
To ...
Do this ...
Display current configuration settings
Type afdiag with no parameter specified.
A list of current settings is displayed for the PI AF server, database, Active Directory, and other configuration items such as audit trail, file extensions, and maximum size for files attached to PI AF objects.
Display a list of available parameters
Type afdiag /?
Execute a specific configuration task
Type afdiag parameter
where parameter is one of the parameters listed in AFDiag utility parameters.