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

PI Powershell

GetPIConnectionStatistics Class

  • Last UpdatedDec 15, 2025
  • 3 minute read
GetPIConnectionStatistics Class

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

SystemObject
  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

  NameDescription
Public method
GetPIConnectionStatistics

Properties

  NameDescription
Public property
Connection

Connection to a PI Data Archive from which to retrieve connection statistics

Public property
Id

ID of the connection information to get

Public property
Name

Name of the connection information to get. Typically, this is the program name. EX: "powershell.exe(8644):remote"

Public property
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 $con

Where:

$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

See Also

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