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

PI Powershell

RemoveAFCategory Class

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

Remove an AF Category

The Remove-AFCategory cmdlet deletes 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.PowerShellRemoveAFCategory

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

Syntax

[CmdletAttribute("Remove", "AFCategory", SupportsShouldProcess = true)]
public class RemoveAFCategory : OSICmdletBase
<CmdletAttribute("Remove", "AFCategory", SupportsShouldProcess := true)>
Public Class RemoveAFCategory
	Inherits OSICmdletBase

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

The RemoveAFCategory type exposes the following members.

Constructors

  NameDescription
Public method
RemoveAFCategory

Properties

  NameDescription
Public property
AFCategory

AF Category to remove

Public property
AFDatabase

AF Database from which to remove the AF Category

Public property
Analysis

Remove from Analysis Categories

Public property
Attribute

Remove from Attribute Categories

Public property
CheckIn

Check in changes immediately

Public property
Element

Remove from Element Categories

Public property
ID

ID of the AF Category to remove

Public property
Name

Name of the AF Category to remove

Public property
ReferenceType

Remove from ReferenceType Categories

Public property
Table

Remove from Table Categories

Examples

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

Where:

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

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

Examples

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

Where:

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

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

Examples

Remove-AFCategory -AFCategory $afCategory -AFDatabase $afDB

Where:

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

$afCategory = Get-AFCategory -Name "Delete this Category" -Element -AFDatabase $afDB

Deletes an existing AF Element Category "Delete this Category" from the AF Database "AFDatabase1" on AF Server "PIAF1".

See Also

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