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

PI Powershell

GetPIArchiveStatistics Class

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

Get archive statistics for a PI Data Archive

The Get-PIArchiveStatistics cmdlet gets the archive statistics for a PI Data Archive server

The connection parameter specifies which connection to a PI Data Archive to use.

Inheritance Hierarchy

SystemObject
  InternalCommand
    Cmdlet
      PSCmdlet
        OSIsoft.PowerShellOSICmdletBase
          OSIsoft.PowerShellGetPIArchiveStatistics

Namespace:  OSIsoft.PowerShell
Assembly:  OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 2.2.3.0 (2.2.3.952)

Syntax

[CmdletAttribute("Get", "PIArchiveStatistics", SupportsShouldProcess = true)]
public class GetPIArchiveStatistics : OSICmdletBase
<CmdletAttribute("Get", "PIArchiveStatistics", SupportsShouldProcess := true)>
Public Class GetPIArchiveStatistics
	Inherits OSICmdletBase

Dim instance As GetPIArchiveStatistics
[CmdletAttribute(L"Get", L"PIArchiveStatistics", SupportsShouldProcess = true)]
public ref class GetPIArchiveStatistics : public OSICmdletBase
[<CmdletAttribute("Get", "PIArchiveStatistics", SupportsShouldProcess = true)>]
type GetPIArchiveStatistics =  
    class
        inherit OSICmdletBase
    end

The GetPIArchiveStatistics type exposes the following members.

Constructors

  NameDescription
Public method
GetPIArchiveStatistics

Properties

  NameDescription
Public property
Connection

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

Examples

Get-PIArchiveStatistics -Connection (Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1")

Gets the archive statistics for the "PISRV1" PI Data Archive server

Examples

Get-PIArchiveStatistics -Connection $con

Where:

$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"

Gets the archive statistics for the "PISRV1" PI Data Archive server

Examples

for () { Get-PIArchiveStatistics -Connection $con; Write-Host; Start-Sleep -Seconds 5 }

Where:

$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"

Gets the archive statistics for the "PISRV1" PI Data Archive server every 5 seconds indefinitely and writes results to the console. Similar to "piartool -as" output.

See Also

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