AddAFCategory Class
- Last UpdatedDec 15, 2025
- 3 minute read
Add an AF Category
The Add-AFCategory cmdlet creates a new AF Category. The category can be added as an attribute, element, analysis, table or reference type category.
Inheritance Hierarchy
InternalCommand
Cmdlet
PSCmdlet
OSIsoft.PowerShellOSICmdletBase
OSIsoft.PowerShellAddAFCategory
Namespace: OSIsoft.PowerShell
Assembly: OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 3.1.1.0 (3.1.1.466)
Syntax
[CmdletAttribute("Add", "AFCategory", SupportsShouldProcess = true)] public class AddAFCategory : OSICmdletBase
<CmdletAttribute("Add", "AFCategory", SupportsShouldProcess := true)> Public Class AddAFCategory Inherits OSICmdletBase Dim instance As AddAFCategory
[CmdletAttribute(L"Add", L"AFCategory", SupportsShouldProcess = true)] public ref class AddAFCategory : public OSICmdletBase
[<CmdletAttribute("Add", "AFCategory", SupportsShouldProcess = true)>] type AddAFCategory = class inherit OSICmdletBase end
The AddAFCategory type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| AddAFCategory |
Properties
| Name | Description | |
|---|---|---|
| AFDatabase | AF Database for which to add the AF Category | |
| Analysis | Add as Analysis Category | |
| Attribute | Add as Attribute Category | |
| CheckIn | Check in changes immediately | |
| Description | Description of the AF Category to add | |
| Element | Add as Element Category | |
| Name | Name of the AF Category to add | |
| ReferenceType | Add as ReferenceType Category | |
| Table | Add as Table Category |
Examples
Add-AFCategory -Name "Product A Manufacturing" -Element -CheckIn -AFDatabase $afDBWhere:
$afDB = Get-AFDatabase -Name "AFDatabase1" -AFServer (Get-AFServer -Name "PIAF1")
Adds a new AF Element Category "Product A Manufacturing" to the AF Database "AFDatabase1" on AF Server "PIAF1". The change is checked in immediately.
Examples
Add-AFCategory -Name "KPIs" -Description "KPIs for Product A Process" -Attribute -CheckIn -AFDatabase $afDB
Where:
$afDB = Get-AFDatabase -Name "AFDatabase1" -AFServer (Get-AFServer -Name "PIAF1")
Adds a new AF Attribute Category "KPIs" with a description to the AF Database "AFDatabase1" on AF Server "PIAF1". The change is checked in immediately.