RemoveAFElement Class
- Last UpdatedDec 15, 2025
- 3 minute read
Remove an AF Element
The Remove-AFElement cmdlet deletes an existing AF Element.
Inheritance Hierarchy
InternalCommand
Cmdlet
PSCmdlet
OSIsoft.PowerShellOSICmdletBase
OSIsoft.PowerShellRemoveAFElement
Namespace: OSIsoft.PowerShell
Assembly: OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 3.1.1.0 (3.1.1.466)
Syntax
[CmdletAttribute("Remove", "AFElement", DefaultParameterSetName = "Element", SupportsShouldProcess = true)] public class RemoveAFElement : OSICmdletBase
<CmdletAttribute("Remove", "AFElement", DefaultParameterSetName := "Element", SupportsShouldProcess := true)> Public Class RemoveAFElement Inherits OSICmdletBase Dim instance As RemoveAFElement
[CmdletAttribute(L"Remove", L"AFElement", DefaultParameterSetName = L"Element", SupportsShouldProcess = true)] public ref class RemoveAFElement : public OSICmdletBase
[<CmdletAttribute("Remove", "AFElement", DefaultParameterSetName = "Element", SupportsShouldProcess = true)>] type RemoveAFElement = class inherit OSICmdletBase end
The RemoveAFElement type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| RemoveAFElement |
Properties
| Name | Description | |
|---|---|---|
| AFDatabase | The AF Database from which to remove the AF Element | |
| AFElement | The AF Element or parent of AF Element to remove. | |
| CheckIn | Check in immediately | |
| DeleteAllReferences | Remove all references of the AF Element | |
| ID | The ID of the AF Element to remove | |
| Name | Name of the AF Element to remove |
Examples
Remove-AFElement -AFElement $afElement -CheckIn
Where:
$afElement = Get-AFElement -Name "Production Line 1" -AFDatabase (Get-AFDatabase -Name "AFDatabase1" -AFServer (Get-AFServer -Name "PIAF1"))
Removes the element "Production Line 1" on the database "AFDatabase1" on the AF Server "PIAF1". The change will be checked in immediately.
Examples
Remove-AFElement -Name "Boiler 1" -AFDatabase $afDatabaseWhere:
$afDatabase = Get-AFDatabase -Name "AFDatabase1" -CheckIn -AFServer (Get-AFServer -Name "PIAF1")
Removes the top level element "Boiler 1" from the database "AFDatabase1" on the AF Server "PIAF1".