RemoveAFPort Class
- Last UpdatedDec 15, 2025
- 3 minute read
Remove an AF Port
The Remove-AFPort cmdlet removes an existing AF Port from an AF Element or AF Element Template
Inheritance Hierarchy
InternalCommand
Cmdlet
PSCmdlet
OSIsoft.PowerShellOSICmdletBase
OSIsoft.PowerShellRemoveAFPort
Namespace: OSIsoft.PowerShell
Assembly: OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 2.2.3.0 (2.2.3.952)
Syntax
[CmdletAttribute("Remove", "AFPort", SupportsShouldProcess = true)] public class RemoveAFPort : OSICmdletBase
<CmdletAttribute("Remove", "AFPort", SupportsShouldProcess := true)> Public Class RemoveAFPort Inherits OSICmdletBase Dim instance As RemoveAFPort
[CmdletAttribute(L"Remove", L"AFPort", SupportsShouldProcess = true)] public ref class RemoveAFPort : public OSICmdletBase
[<CmdletAttribute("Remove", "AFPort", SupportsShouldProcess = true)>] type RemoveAFPort = class inherit OSICmdletBase end
The RemoveAFPort type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| RemoveAFPort |
Properties
| Name | Description | |
|---|---|---|
| AFElement | AF Element from which to remove the AF Port | |
| AFElementTemplate | AF Element Template from which to remove the AF Port | |
| AFPort | AF Port to remove | |
| CheckIn | Check in changes immediately | |
| ID | GUID of the AF Port to remove | |
| Name | Name of the AF Port to remove |
Examples
Remove-AFPort -Name InputPort1 -AFElementTemplate $afElementTemplate -CheckIn
Where:
$afDB = Get-AFDatabase "AFDatabase1" -AFServer (Get-AFServer -Name "PIAF1")
$afElementTemplate = Get-AFElementTemplate -Name Boiler -AFDatabase $afDB
Removes the existing AF Port InputPort1 from the Boiler element template on the AF Database AFDatabase1. The change is checked in immediately.
Examples
Remove-AFPort -AFPort $MyAFPort -CheckIn
Where:
$afDB = Get-AFDatabase "AFDatabase1" -AFServer (Get-AFServer -Name "PIAF1")
$afElementTemplate = Get-AFElementTemplate -Name Boiler -AFDatabase $afDB
$MyAFPort = Get-AFPort -Name InputPort1 -AFElementTemplate $afElementTemplate
Removes the AF Port InputPort1 from the Boiler element template on the AF Database AFDatabase1.