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

PI Powershell

GetPIBufferSession Class

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

Get a PI Buffer Session

The Get-PIBufferSession cmdlet gets a PI Buffer Subsystem buffer session on the local machine. This cmdlet can only be run directly against the local instance of PI Buffer Subsystem

This cmdlet can be run against remote PI Buffer Subsystems by leveraging PowerShell Remoting.

Inheritance Hierarchy

SystemObject
  InternalCommand
    Cmdlet
      PSCmdlet
        OSIsoft.PowerShellOSICmdletBase
          OSIsoft.PowerShellGetPIBufferSession

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

Syntax

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

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

The GetPIBufferSession type exposes the following members.

Constructors

  NameDescription
Public method
GetPIBufferSession

Properties

  NameDescription
Public property
LogicalServerName

Logical server name. This is the PI Collective name for collectives, or the server name for standalone PI Data Archive servers

Public property
PhysicalServerName

Physical server name. This is the member node name for PI Collectives, or the server name for standalone PI Data Archive servers. If not specified for a PI Collective, all member sessions will be included. This parameter is not required for a standalone PI Data Archive server.

Examples

Get-PIBufferSession -LogicalServerName PISRV-Collective -PhysicalServerName PISRV-1

Gets the PI Buffer session from the local instance of PI Buffer Subsystem for the PISRV-1 machine, which is a member of the PISRV-Collective PI Data Archive HA Collective.

Examples

Get-PIBufferSession -LogicalServerName PISRV-Collective

Gets all PI Buffer sessions from the local instance of PI Buffer Subsystem for the PISRV-Collective PI Data Archive HA Collective. For example, if this is a 3-member collective, the results will contain 3 buffer sessions.

Examples

Invoke-Command -ComputerName PIINT1 -ScriptBlock { Get-PIBufferSession -LogicalServerName PISRV-Collective -PhysicalServerName PISRV-1 }

Gets the PI Buffer session from the PIINT1 instance of PI Buffer Subsystem for the PISRV-1 machine, which is a member of the PISRV-Collective PI Data Archive HA Collective.

Note the use of Invoke-Command. Failure of this example to execute properly is likely not an issue with Get-PIBufferSession, but with the network or PS connection to the remote computer. Note that the OSIsoft.PowerShell module must be installed on the remote computer as well for this to work.

See Also

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