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

PI Powershell

GetAFCategory Class

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

Get an AF Category

The Get-AFCategory cmdlet gets an existing AF Category. The category can be an attribute, element, analysis, table or reference type category.

Inheritance Hierarchy

SystemObject
  InternalCommand
    Cmdlet
      PSCmdlet
        OSIsoft.PowerShellOSICmdletBase
          OSIsoft.PowerShellGetAFCategory

Namespace:  OSIsoft.PowerShell
Assembly:  OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 2.2.3.0 (2.2.3.952)

Syntax

[CmdletAttribute("Get", "AFCategory", DefaultParameterSetName = "Name", 
	SupportsShouldProcess = true)]
public class GetAFCategory : OSICmdletBase
<CmdletAttribute("Get", "AFCategory", DefaultParameterSetName := "Name", 
	SupportsShouldProcess := true)>
Public Class GetAFCategory
	Inherits OSICmdletBase

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

The GetAFCategory type exposes the following members.

Constructors

  NameDescription
Public method
GetAFCategory

Properties

  NameDescription
Public property
AFDatabase

AF Database from which to get the AF Category

Public property
Analysis

Get from Analysis Categories

Public property
Attribute

Get from Attribute Categories

Public property
Element

Get from Element Categories

Public property
ID

ID of the AF Category to get

Public property
Name

Name of the AF Category to get

Public property
ReferenceType

Get from ReferenceType Categories

Public property
Refresh

Refresh container before accessing

Public property
Table

Get from Table Categories

Examples

Get-AFCategory -Name "Product A Manufacturing" -Element -AFDatabase $afDB

Where:

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

Gets an existing AF Element Category "Product A Manufacturing" from the AF Database "AFDatabase1" on AF Server "PIAF1".

Examples

Get-AFCategory -Name "KPIs" -Attribute -AFDatabase $afDB

Where:

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

Gets an existing AF Attribute Category "KPIs" from the AF Database "AFDatabase1" on AF Server "PIAF1".

See Also

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