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

PI Powershell

GetAFPort Class

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

Get an AF Port

The Get-AFPort cmdlet gets an AF Port from an AF Element or AF Element Template

Inheritance Hierarchy

SystemObject
  InternalCommand
    Cmdlet
      PSCmdlet
        OSIsoft.PowerShellOSICmdletBase
          OSIsoft.PowerShellGetAFPort

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

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

  NameDescription
Public method
GetAFPort

Properties

  NameDescription
Public property
AFElement

AF Element from which to get the AF Port

Public property
AFElementTemplate

AF Element Template from which to get the AF Port

Public property
ID

GUID of the AF Port to get

Public property
Index

Index of the AF Port to get

Public property
Name

Name of the AF Port to get

Public property
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.

See Also

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