SetAFPort Class
- Last UpdatedDec 15, 2025
- 3 minute read
Set an AF Port
The Set-AFPort cmdlet edits an existing AF Port on an AF Element or AF Element Template
Inheritance Hierarchy
InternalCommand
Cmdlet
PSCmdlet
OSIsoft.PowerShellOSICmdletBase
OSIsoft.PowerShellSetAFPort
Namespace: OSIsoft.PowerShell
Assembly: OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 3.1.1.0 (3.1.1.466)
Syntax
[CmdletAttribute("Set", "AFPort", DefaultParameterSetName = "Name", SupportsShouldProcess = true)] public class SetAFPort : OSICmdletBase
<CmdletAttribute("Set", "AFPort", DefaultParameterSetName := "Name", SupportsShouldProcess := true)> Public Class SetAFPort Inherits OSICmdletBase Dim instance As SetAFPort
[CmdletAttribute(L"Set", L"AFPort", DefaultParameterSetName = L"Name", SupportsShouldProcess = true)] public ref class SetAFPort : public OSICmdletBase
[<CmdletAttribute("Set", "AFPort", DefaultParameterSetName = "Name", SupportsShouldProcess = true)>] type SetAFPort = class inherit OSICmdletBase end
The SetAFPort type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| SetAFPort |
Properties
| Name | Description | |
|---|---|---|
| AFPort | AF Port to edit | |
| AFPortType | AF Port Type to set on the AF Port | |
| AllowedElementCategory | List of AF Element Categories for AF Elements that are allowed to connect to this port | |
| AllowedElementTemplate | Only AF Elements using this AF Element Template are allowed to connect to this port | |
| AllowedElementType | Types of AF Elements that are allowed to connect to this port | |
| CheckIn | Check in changes immediately | |
| Description | Description to set on the AF Port | |
| MaxConnections | Maximum number of connections to set on the AF Port | |
| NewName | New name to set on the AF Port | |
| PassThru | Returns objects that were changed. By default, this cmdlet does not generate any output. |
Examples
Set-AFPort -Description "Input port for Boiler template" -MaxConnections 10 -AFPort $MyAFPort
Where:
$afDB = Get-AFDatabase "AFDatabase1" -AFServer (Get-AFServer -Name "PIAF1")
$afElementTemplate = Get-AFElementTemplate -Name Boiler -AFDatabase $afDB
$MyAFPort = Get-AFPort -Name InputPort1 -AFElementTemplate $afElementTemplate
Edits the AF Port InputPort1 from the Boiler element template on the AF Database AFDatabase1 with an updated description and max number of connections allowed.