SetAFCategory Class
- Last UpdatedDec 15, 2025
- 3 minute read
Set an AF Category
The Set-AFCategory cmdlet edits an existing AF Category. The category can be an attribute, element, analysis, table or reference type category.
Inheritance Hierarchy
InternalCommand
Cmdlet
PSCmdlet
OSIsoft.PowerShellOSICmdletBase
OSIsoft.PowerShellSetAFCategory
Namespace: OSIsoft.PowerShell
Assembly: OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 2.2.3.0 (2.2.3.952)
Syntax
[CmdletAttribute("Set", "AFCategory", SupportsShouldProcess = true)] public class SetAFCategory : OSICmdletBase
<CmdletAttribute("Set", "AFCategory", SupportsShouldProcess := true)> Public Class SetAFCategory Inherits OSICmdletBase Dim instance As SetAFCategory
[CmdletAttribute(L"Set", L"AFCategory", SupportsShouldProcess = true)] public ref class SetAFCategory : public OSICmdletBase
[<CmdletAttribute("Set", "AFCategory", SupportsShouldProcess = true)>] type SetAFCategory = class inherit OSICmdletBase end
The SetAFCategory type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| SetAFCategory |
Properties
| Name | Description | |
|---|---|---|
| AFCategory | AF Category to edit | |
| CheckIn | Check in changes immediately | |
| Description | Description to set on the AF Category | |
| NewName | NewName to set on the AF Category | |
| PassThru | Returns objects that were changed. By default, this cmdlet does not generate any output. |
Examples
Set-AFCategory -NewName "Product A Manufacturing" -CheckIn -AFCategory $afCategoryWhere:
$afDB = Get-AFDatabase -Name "AFDatabase1" -AFServer (Get-AFServer -Name "PIAF1")
$afCategory = Get-AFCategory -Name "New Category 1" -Element -AFDatabase $afDB
Renames an existing AF Element Category "New Category 1" to "Product A Manufacturing" on the AF Database "AFDatabase1" on AF Server "PIAF1". The change is checked in immediately.
Examples
Set-AFCategory -Description "KPIs for Product A Process" -CheckIn -AFCategory $afCategoryWhere:
$afDB = Get-AFDatabase -Name "AFDatabase1" -AFServer (Get-AFServer -Name "PIAF1")
$afCategory = Get-AFCategory -Name "KPIs" -Element -AFDatabase $afDB
Adds a description to the existing AF Attribute Category "KPIs" on the AF Database "AFDatabase1" on AF Server "PIAF1". The change is checked in immediately.