GetPISnapshotStatistics Class
- Last UpdatedDec 15, 2025
- 3 minute read
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
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
| Name | Description | |
|---|---|---|
| GetPISnapshotStatistics |
Properties
| Name | Description | |
|---|---|---|
| ArchiveSet | Archive set for which to retrieve snapshot statistics. If this parameter is not specified, historical archive set is used. 0 = Historical : 1 = Future | |
| 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 $conWhere:
$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.