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

PI Powershell

GetPIArchiveFileInfo Class

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

Gets detailed PI Archive file information from a PI Data Archive

The Get-PIArchiveFileInfo cmdlet gets detailed PI Archive file information for a registered archive on a PI Data Archive.

Get-PIArchiveFileInfo can be used to get a specific archive file by filename, by archive ID, all archives in a specified archive set, or all registered archives.

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

Inheritance Hierarchy

SystemObject
  InternalCommand
    Cmdlet
      PSCmdlet
        OSIsoft.PowerShellOSICmdletBase
          OSIsoft.PowerShellOSICmdletBaseWithConnection
            OSIsoft.PowerShellGetPIArchiveFileInfo

Namespace:  OSIsoft.PowerShell
Assembly:  OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 3.1.1.0 (3.1.1.466)

Syntax

[CmdletAttribute("Get", "PIArchiveFileInfo", SupportsShouldProcess = true)]
public class GetPIArchiveFileInfo : OSICmdletBaseWithConnection
<CmdletAttribute("Get", "PIArchiveFileInfo", SupportsShouldProcess := true)>
Public Class GetPIArchiveFileInfo
	Inherits OSICmdletBaseWithConnection

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

The GetPIArchiveFileInfo type exposes the following members.

Constructors

  NameDescription
Public method
GetPIArchiveFileInfo

Properties

  NameDescription
Public property
ArchiveSet

Specifies the archive set from which to retrieve information:

0 = Historical

1 = Future

Public property
Connection

Specifies the connection to a PI Data Archive to use

(Overrides OSICmdletBaseWithConnectionConnection.)
Public property
Id

Specifies the ID of the archive file for which to get detailed information

An archive ID of 0 is the primary archive

Public property
Name

Specifies the name of the archive file for which to get detailed information

Examples

Get-PIArchiveFileInfo -Name "E:\PIArchives\piarch001-Connection $con

Where:

$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"

Get the PI Archive file information for the "piarch001" archive file. Note that "piarch001" must be an archive file registered with the PI Data Archive "PISRV1".

Examples

Get-PIArchiveFileInfo -ID 0 -Connection (Connect-PIDataArchive -PIDataArchiveMachineName PISRV1)

Get the PI Archive file information for the primary archive file (ID=0) on the "PISRV1" PI Data Archive server. Because -ArchiveSet parameter is not explicitly set, a value of 0 (Historical) will be used by default.

Examples

Get-PIArchiveFileInfo -ArchiveSet 1 -Connection (Connect-PIDataArchive -PIDataArchiveMachineName PISRV1)

Get the PI Archive file information for all future archives (ArchiveSet = 1) on the "PISRV1" PI Data Archive server.

See Also

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