AddAFElementTemplate Class
- Last UpdatedDec 15, 2025
- 4 minute read
Add an AF Element Template
The Add-AFElementTemplate cmdlet adds a new AF Element Template.
Inheritance Hierarchy
InternalCommand
Cmdlet
PSCmdlet
OSIsoft.PowerShellOSICmdletBase
OSIsoft.PowerShellAddAFElementTemplate
Namespace: OSIsoft.PowerShell
Assembly: OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 3.1.1.0 (3.1.1.466)
Syntax
[CmdletAttribute("Add", "AFElementTemplate", SupportsShouldProcess = true)] public class AddAFElementTemplate : OSICmdletBase
<CmdletAttribute("Add", "AFElementTemplate", SupportsShouldProcess := true)> Public Class AddAFElementTemplate Inherits OSICmdletBase Dim instance As AddAFElementTemplate
[CmdletAttribute(L"Add", L"AFElementTemplate", SupportsShouldProcess = true)] public ref class AddAFElementTemplate : public OSICmdletBase
[<CmdletAttribute("Add", "AFElementTemplate", SupportsShouldProcess = true)>] type AddAFElementTemplate = class inherit OSICmdletBase end
The AddAFElementTemplate type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| AddAFElementTemplate |
Properties
| Name | Description | |
|---|---|---|
| AFCategories | AF Categories to apply to the AF Element Template to create | |
| AFDatabase | AF Database on which to create the AF Element Template | |
| AFElementType | Element template type of the AF Element Template to create | |
| AllowExtensions | Allow extensions on the AF Element Template to create | |
| BaseTemplate | Base template of the AF Element Template to create | |
| CheckIn | Check in immediately | |
| Description | Description of the AF Element Template to create | |
| ExtendedProperties | Extended properties of the AF Element Template to create | |
| Name | Name of the AF Element Template to create | |
| NamingPattern | Naming pattern of the AF Element Template to create |
Examples
Add-AFElementTemplate -Name "Boiler" -AFDatabase $afDB -CheckInWhere:
$afDB = Get-AFDatabase "AFDatabase1" -AFServer (Get-AFServer -Name "PIAF1")
Adds the element template "Boiler" to the database "AFDatabase1" on the AF Server "PIAF1". The change is checked in immediately.
Examples
Add-AFElementTemplate -Name "Boiler" -Description "Template for all Boilers" -AFDatabase $afDB
Where:
$afDB = Get-AFDatabase "AFDatabase1" -AFServer (Get-AFServer -Name "PIAF1")
Adds the Element Template of "Boiler" to the database "AFDatabase1" on the AF Server "PIAF1" with an added description. The change is checked in immediately.
Examples
Add-AFElementTemplate -Name "Boiler" -Description "Template for all Boilers" -AFCategories (Get-AFCategory -AFDatabase $afDB -Name "Boiler" -Element) -AFDatabase $afDB
Where:
$afDB = Get-AFDatabase "AFDatabase1" -AFServer (Get-AFServer -Name "PIAF1")
Adds the Element Template of "Boiler" to the database "AFDatabase1" on the AF Server "PIAF1" with an added description. The change is checked in immediately. A description is added to the element template as well as adding the existing AF Category "Boilers" to the template.