GetPIArchiveStatistics Class
- Last UpdatedDec 15, 2025
- 3 minute read
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
InternalCommand
Cmdlet
PSCmdlet
OSIsoft.PowerShellOSICmdletBase
OSIsoft.PowerShellOSICmdletBaseWithConnection
OSIsoft.PowerShellGetPIArchiveStatistics
Namespace: OSIsoft.PowerShell
Assembly: OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 3.1.1.0 (3.1.1.466)
Syntax
[CmdletAttribute("Get", "PIArchiveStatistics", SupportsShouldProcess = true)] public class GetPIArchiveStatistics : OSICmdletBaseWithConnection
<CmdletAttribute("Get", "PIArchiveStatistics", SupportsShouldProcess := true)> Public Class GetPIArchiveStatistics Inherits OSICmdletBaseWithConnection Dim instance As GetPIArchiveStatistics
[CmdletAttribute(L"Get", L"PIArchiveStatistics", SupportsShouldProcess = true)] public ref class GetPIArchiveStatistics : public OSICmdletBaseWithConnection
[<CmdletAttribute("Get", "PIArchiveStatistics", SupportsShouldProcess = true)>] type GetPIArchiveStatistics = class inherit OSICmdletBaseWithConnection end
The GetPIArchiveStatistics type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| GetPIArchiveStatistics |
Properties
| Name | Description | |
|---|---|---|
| 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.