AFAdmin Class
- Last UpdatedNov 18, 2025
- 5 minute read
- PI System
- AF SDK 2024 R2
- Developer
The AFAdmin class is used to perform administrative functions with the
PI AF Server.
Inheritance Hierarchy
SystemObject
OSIsoft.AF.DiagnosticsAFAdmin
OSIsoft.AF.DiagnosticsAFAdmin
Namespace: OSIsoft.AF.Diagnostics
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static class AFAdmin
Public NotInheritable Class AFAdmin
public ref class AFAdmin abstract sealed
[<AbstractClassAttribute>] [<SealedAttribute>] type AFAdmin = class end
The AFAdmin type exposes the following members.
Methods
| Name | Description | |
|---|---|---|
| AddTrustedProvider |
Add the specified trusted provider subject name to the list of trusted providers in the PISystem.
| |
| ClearChangeTables |
Clears the tables in the PI AF SQL database which record information on changes to the system.
| |
| DeleteOrphans |
Deletes orphan objects in the PISystem.
| |
| EnableExternalDataTables |
Enables support for an AFTable to link to an external source.
| |
| EnableExternalDataTablesAllowNonImpersonatedUsers |
Enables support for an AFTable to link to an external source with non-impersonated users.
| |
| EnablePropagationOfTargetDeletion |
Enables support for propagating the deletion of targets (elements) to the referencing analyses and notifications.
| |
| EnableUomCaseSensitivity |
Changes configuration of UOM abbreviations from case insensitive to case
sensitive in the PI AF SQL Server database.
| |
| GetDiagnostics |
Gets diagnostic information from the system.
| |
| GetPlugInVerifyLevel |
Gets the current level of verification required for an AFPlugIn to be loaded from the server.
| |
| GetTrustedProviders |
Returns the list of trusted providers in the PISystem.
| |
| GetVersion |
Converts the string representing a version to a Version object.
| |
| RebuildPathCache |
Rebuilds the path cache to each element in the PI AF SQL Server database.
| |
| Reindex |
Rebuild every index in the PI AF SQL Server database.
| |
| RemoveTrustedProvider |
Remove the specified trusted provider subject name from the list of trusted providers in the PISystem.
| |
| ResyncUsers |
Updates the usernames in AF.
| |
| SetFileOptions | ||
| SetID | ||
| SetPlugInVerifyLevel |
Configures the level of verification required for an AFPlugIn to be loaded from the server.
|
Remarks
The methods in this class can be used to perform administrative functions with the
PI AF Server. These could be used with PowerShell to script tasks to manage the server.
The functionality provided by this class can also be accomplished by using the
AFDiag utility.
Use the PISystem.Supports method to check if the PISystem supports the AdminFunctionality feature.
| Methods in this class require the administrative right to execute. These methods will error on servers before AF 2018 R2 (2.10.5). |
| This method, property, or class is not available in the legacy .NET 3.5 version of the SDK. |