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

PI Powershell

RemoveAFElementTempalte Class

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

Remove an AF Element Template

The Remove-AFElementTemplate cmdlet deletes an existing AF Element Template.

Inheritance Hierarchy

SystemObject
  InternalCommand
    Cmdlet
      PSCmdlet
        OSIsoft.PowerShellOSICmdletBase
          OSIsoft.PowerShellRemoveAFElementTempalte

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

Syntax

[CmdletAttribute("Remove", "AFElementTemplate", DefaultParameterSetName = "Name", 
	SupportsShouldProcess = true)]
public class RemoveAFElementTempalte : OSICmdletBase
<CmdletAttribute("Remove", "AFElementTemplate", DefaultParameterSetName := "Name", 
	SupportsShouldProcess := true)>
Public Class RemoveAFElementTempalte
	Inherits OSICmdletBase

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

The RemoveAFElementTempalte type exposes the following members.

Constructors

  NameDescription
Public method
RemoveAFElementTempalte

Properties

  NameDescription
Public property
AFDatabase

AF Database from which to remove the AF Element Template

Public property
AFElementTemplate

AF Element Template to remove

Public property
CheckIn

Check in changes immediately

Public property
ID

ID of the AF Element Template to remove

Public property
Name

Name of the AF Element Template to remove

Examples

Remove-AFElementTemplate -Name "Boiler" -AFDatabase $afDB -CheckIn

Where:

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

Deletes the element template "Boiler" on the database "AFDatabase1" on the AF Server "PIAF1". The change is checked in immediately.

Examples

Remove-AFElementTemplate -AFElementTemplate $afEleTemplate -CheckIn

Where:

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

$afEleTemplate = Get-AFElementTemplate -Name "Boiler" -AFDatabase $afDB

Deletes the AF element template "Boiler" on the database "AFDatabase1" on the AF Server "PIAF1". The change is checked in immediately.

Examples

Remove-AFElementTemplate -Name "*" -AFDatabase $afDB -CheckIn

Where:

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

Deletes all element templates on the database "AFDatabase1" on the AF Server "PIAF1". The change is checked in immediately.

See Also

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