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

PI Powershell

RemoveAFAttributeTemplate Class

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

Remove an AF Attribute Template

The Remove-AFAttributeTemplate cmdlet deletes an existing AF Attribute Template. The AF Attribute Template can be on an existing Element Template, or a Sub Attribute Template.

Inheritance Hierarchy

SystemObject
  InternalCommand
    Cmdlet
      PSCmdlet
        OSIsoft.PowerShellOSICmdletBase
          OSIsoft.PowerShellRemoveAFAttributeTemplate

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

Syntax

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

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

The RemoveAFAttributeTemplate type exposes the following members.

Constructors

  NameDescription
Public method
RemoveAFAttributeTemplate

Properties

  NameDescription
Public property
AFAttributeTemplate

AF Attribute Template to remove

Public property
AFElementTemplate

AF Element Template from which to remove the AF Attribute Template

Public property
CheckIn

Check in changes immediately

Public property
ID

ID of the AF Attribute Template to remove

Public property
Name

Name of the AF Attribute Template to remove

Examples

Remove-AFAttributeTemplate -Name "Temperature" -AFElementTemplate $afEleTemplate -CheckIn

Where:

$afEleTemplate = Get-AFElementTemplate -Name "Anneal Oven" -AFDatabase (Get-AFDatabase -Name "AFDatabase1" -AFServer (Get-AFServer -Name "PIAF1"))

Removes the AF Attribute Template "Temperature" from the element template "Oven" on the database "AFDatabase1" on the AF Server "PIAF1". The change is checked in immediately.

Examples

Remove-AFAttributeTemplate -AFAttributeTemplate $afAttTemplate -CheckIn

Where:

$afEleTemplate = Get-AFElementTemplate -Name "Oven" -AFDatabase (Get-AFDatabase -Name "AFDatabase1" -AFServer (Get-AFServer -Name "PIAF1"))

$afAttTemplate = Get-AFAttributeTemplate -Name "Temperature" -AFElementTemplate $afElement

Removes the AF Attribute Template "Temperature" from the element template "Oven" on the database "AFDatabase1" on the AF Server "PIAF1". The change is checked in immediately.

Examples

Remove-AFAttributeTemplate -Name "Fahrenheit" -AFAttributeTemplate $afAttTemplate -CheckIn

Where:

$afEleTemplate = Get-AFElementTemplate -Name "Oven" -AFDatabase (Get-AFDatabase -Name "AFDatabase1" -AFServer (Get-AFServer -Name "PIAF1"))

$afAttTemplate = Get-AFAttributeTemplate -Name "Temperature" -AFElementTemplate $afElement

Removes the Child AF Attribute Template "Fahrenheit" from the parent AF Attribute Template "Temperature" on the element template "Oven" 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