GetAFPort Class
- Last UpdatedDec 15, 2025
- 3 minute read
Get an AF Port
The Get-AFPort cmdlet gets an AF Port from an AF Element or AF Element Template
Inheritance Hierarchy
InternalCommand
Cmdlet
PSCmdlet
OSIsoft.PowerShellOSICmdletBase
OSIsoft.PowerShellGetAFPort
Namespace: OSIsoft.PowerShell
Assembly: OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 3.1.1.0 (3.1.1.466)
Syntax
[CmdletAttribute("Get", "AFPort", SupportsShouldProcess = true)] public class GetAFPort : OSICmdletBase
<CmdletAttribute("Get", "AFPort", SupportsShouldProcess := true)> Public Class GetAFPort Inherits OSICmdletBase Dim instance As GetAFPort
[CmdletAttribute(L"Get", L"AFPort", SupportsShouldProcess = true)] public ref class GetAFPort : public OSICmdletBase
[<CmdletAttribute("Get", "AFPort", SupportsShouldProcess = true)>] type GetAFPort = class inherit OSICmdletBase end
The GetAFPort type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| GetAFPort |
Properties
| Name | Description | |
|---|---|---|
| AFElement | AF Element from which to get the AF Port | |
| AFElementTemplate | AF Element Template from which to get the AF Port | |
| ID | GUID of the AF Port to get | |
| Index | Index of the AF Port to get | |
| Name | Name of the AF Port to get | |
| Refresh | Refresh the container before accessing |
Examples
Get-AFPort -Name InputPort1 -AFElementTemplate $afElementTemplate
Where:
$afDB = Get-AFDatabase "AFDatabase1" -AFServer (Get-AFServer -Name "PIAF1")
$afElementTemplate = Get-AFElementTemplate -Name Boiler -AFDatabase $afDB
Gets the AF Port InputPort1 from the Boiler element template on the AF Database AFDatabase1.
Examples
Get-AFPort -Name InputPort1 -AFElement $afElement
Where:
$afDB = Get-AFDatabase "AFDatabase1" -AFServer (Get-AFServer -Name "PIAF1")
$afElement = Get-AFElement -Name WestSite -AFDatabase $afDB
Gets the AF Port InputPort1 from the top level element WestSite on the AF Database AFDatabase1.