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

PI Powershell

FindAFEventFrame Class

  • Last UpdatedDec 15, 2025
  • 5 minute read
FindAFEventFrame Class

Find AF Event Frame(s)

The Find-AFEventFrame cmdlet searches for Event Frames, which can be searched as part of an AF Database or AF Element.

Inheritance Hierarchy

SystemObject
  InternalCommand
    Cmdlet
      PSCmdlet
        OSIsoft.PowerShellOSICmdletBase
          OSIsoft.PowerShellFindAFEventFrame

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

Syntax

[CmdletAttribute("Find", "AFEventFrame", SupportsShouldProcess = true)]
public class FindAFEventFrame : OSICmdletBase
<CmdletAttribute("Find", "AFEventFrame", SupportsShouldProcess := true)>
Public Class FindAFEventFrame
	Inherits OSICmdletBase

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

The FindAFEventFrame type exposes the following members.

Constructors

  NameDescription
Public method
FindAFEventFrame

Properties

  NameDescription
Public property
AFCategory

Only event frames in this AF Category will be returned

Public property
AFDatabase

The AF Database for which to search for AF Event Frames

Public property
AFDurationQuery

Only event frames matching all AF Duration Queries will be returned

Public property
AFElement

The AF Element for which to search for AF Event Frames

Public property
AFElementTemplate

Only event frames using this AF Element Template will be returned

Public property
AFEventFrameSearchMode

Search mode that determines the direction in time to proceed from either the start time or end time when returning AF Event Frames

Public property
AFSearchField

Which fields of the AF Event Frames that are searched.

Public property
AFSearchMode

AF Search Mode used to determine what event frames are returned relative to the search's start and end times

Public property
AFSortField

AF Event Frame field on which to sort the results of the search

Public property
AFSortOrder

Sort order in which the AF Event Frames are returned

Public property
EndTime

End time to find AF Event Frame(s) from

Public property
MaxCount

Maximum number of Event Frames to return from the search

Public property
NameFilter

Only event frames which match the name filter will be returned

Public property
Query

Query string used for finding AF Event Frames

Public property
ReferencedElementNameFilter

Only event frames referenced by AF Elements matching this name filter will be returned

Public property
ReferencedElementTemplate

Only event frames referenced by this AF Element Template will be returned

Public property
SearchFullHierarchy

Include all child objects in AF Event Frame search

Public property
SearchRoot

The root object to start the search

Public property
StartIndex

The starting index (zero based) of the items to be returned

Public property
StartTime

Start time to find AF Event Frame(s) from

Examples

Find-AFEventFrame -StartTime (ConvertFrom-AFRelativeTime "T") -EndTime (ConvertFrom-AFRelativeTime "*") -AFSearchMode Inclusive -AFDatabase $afDB

Where:

$afDB = Get-AFDatabase "AFDatabase1" -AFServer (Get-AFServer -Name "PIAF1")

Retrieves all event frames since the beginning of today (since 00:00:00) on the AF Database "AFDatabase1"

Examples

Find-AFEventFrame -StartTime (ConvertFrom-AFRelativeTime "Y") -EndTime (ConvertFrom-AFRelativeTime "T") -AFSortField StartTime -AFSortOrder Descending -AFDatabase $afDB

Where:

$afDB = Get-AFDatabase "AFDatabase1" -AFServer (Get-AFServer -Name "PIAF1")

Retrieves all event frames from yesterday on the AF Database "AFDatabase1". The results are sorted based on start time starting with the latest start time.

Examples

Find-AFEventFrame -StartTime (ConvertFrom-AFRelativeTime "Y") -EndTime (ConvertFrom-AFRelativeTime "T") -AFSortField EndTime -AFSortOrder Ascending -NameFilter "Boiler*" -AFDatabase $afDB

Where:

$afDB = Get-AFDatabase "AFDatabase1" -AFServer (Get-AFServer -Name "PIAF1")

Retrieves all event frames from yesterday on the AF Database "AFDatabase1" which are associated with an AF Element matching the mask "Boiler*". The results are sorted based on end time starting with the earliest start time.

See Also

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