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

PI Powershell

GetPISnapshotStatistics Class

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

Get snapshot statistics for a PI Data Archive

The Get-PISnapshotStatistics cmdlet gets the snapshot 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.PowerShellGetPISnapshotStatistics

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

Syntax

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

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

The GetPISnapshotStatistics type exposes the following members.

Constructors

  NameDescription
Public method
GetPISnapshotStatistics

Properties

  NameDescription
Public property
ArchiveSet

Archive set for which to retrieve snapshot statistics. If this parameter is not specified, historical archive set is used.

0 = Historical : 1 = Future

Public property
Connection

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

Examples

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

Gets the snapshot statistics on the "PISRV1" PI Data Archive server

Examples

Get-PISnapshotStatistics -ArchiveSet 1 -Connection $con

Where:

$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"

Gets the snapshot statistics for future tags on the "PISRV1" PI Data Archive server

Examples

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

Where:

$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"

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

See Also

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