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

PI Powershell

ClearPIArchiveQueue Class

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

Flush events in PI Archive Subsystem read/write cache to disk

The Clear-PIArchiveQueue cmdlet flushes the PI Archive Subsystem read and write cache to disk. Note that these cached records may still exist in the Windows File System Cache (FSC)

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

Inheritance Hierarchy

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

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

Syntax

[CmdletAttribute("Clear", "PIArchiveQueue", SupportsShouldProcess = true)]
public class ClearPIArchiveQueue : OSICmdletBaseWithConnection
<CmdletAttribute("Clear", "PIArchiveQueue", SupportsShouldProcess := true)>
Public Class ClearPIArchiveQueue
	Inherits OSICmdletBaseWithConnection

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

The ClearPIArchiveQueue type exposes the following members.

Constructors

  NameDescription
Public method
ClearPIArchiveQueue

Properties

  NameDescription
Public property
Connection

Connection to a PI Data Archive for which to flush the PI Archive Subsystem read and write cache

(Overrides OSICmdletBaseWithConnectionConnection.)

Examples

Clear-PIArchiveQueue -Connection (Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1")

Flush the PI Data Archive read and write cache from the PI Data Archive "PISRV1".

Examples

Clear-PIArchiveQueue -Connection $con

Where:

$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"

Flush the PI Data Archive read and write cache from the PI Data Archive "PISRV1", where the connection object to PISRV1 is stored in the variable $con.

See Also

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