GetPIConnectionStatistics Class
- Last UpdatedDec 15, 2025
- 3 minute read
Get PI connection statistics for a PI Data Archive
The Get-PIConnectionStatistics cmdlet gets detailed connection information for a PI Data Archive server specified by the -Connection parameter. If no -Name or -ID is specified, all connection information is returned.
Inheritance Hierarchy
InternalCommand
Cmdlet
PSCmdlet
OSIsoft.PowerShellOSICmdletBase
OSIsoft.PowerShellGetPIConnectionStatistics
Namespace: OSIsoft.PowerShell
Assembly: OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 2.2.3.0 (2.2.3.952)
Syntax
[CmdletAttribute("Get", "PIConnectionStatistics", SupportsShouldProcess = true)] public class GetPIConnectionStatistics : OSICmdletBase
<CmdletAttribute("Get", "PIConnectionStatistics", SupportsShouldProcess := true)> Public Class GetPIConnectionStatistics Inherits OSICmdletBase Dim instance As GetPIConnectionStatistics
[CmdletAttribute(L"Get", L"PIConnectionStatistics", SupportsShouldProcess = true)] public ref class GetPIConnectionStatistics : public OSICmdletBase
[<CmdletAttribute("Get", "PIConnectionStatistics", SupportsShouldProcess = true)>] type GetPIConnectionStatistics = class inherit OSICmdletBase end
The GetPIConnectionStatistics type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| GetPIConnectionStatistics |
Properties
| Name | Description | |
|---|---|---|
| Connection | Connection to a PI Data Archive from which to retrieve connection statistics | |
| Id | ID of the connection information to get | |
| Name | Name of the connection information to get. Typically, this is the program name. EX: "powershell.exe(8644):remote" | |
| Search | Search all fields for this string mask |
Examples
Get-PIConnectionStatistics -Connection (Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1")Gets all connection information from the "PISRV1" PI Data Archive server
Examples
Get-PIArchiveStatistics -ID 57 -Connection $conWhere:
$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"
Gets the connection information for connection ID 57 from the "PISRV1" PI Data Archive server
Examples
Get-PIArchiveStatistics -Search *piadmin* -Connection $con
Where:
$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"
Gets the connection information for any connection for which a field contains the string "piadmin" from the "PISRV1" PI Data Archive server