AddAFServer Class
- Last UpdatedDec 15, 2025
- 3 minute read
Add an AF Server to the local AF Servers list
The Add-AFServer cmdlet will add an AF Server to the local AF Server list.
Inheritance Hierarchy
InternalCommand
Cmdlet
PSCmdlet
OSIsoft.PowerShellOSICmdletBase
OSIsoft.PowerShellAddAFServer
Namespace: OSIsoft.PowerShell
Assembly: OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 2.2.3.0 (2.2.3.952)
Syntax
[CmdletAttribute("Add", "AFServer", SupportsShouldProcess = true)] public class AddAFServer : OSICmdletBase
<CmdletAttribute("Add", "AFServer", SupportsShouldProcess := true)> Public Class AddAFServer Inherits OSICmdletBase Dim instance As AddAFServer
[CmdletAttribute(L"Add", L"AFServer", SupportsShouldProcess = true)] public ref class AddAFServer : public OSICmdletBase
[<CmdletAttribute("Add", "AFServer", SupportsShouldProcess = true)>] type AddAFServer = class inherit OSICmdletBase end
The AddAFServer type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| AddAFServer |
Properties
| Name | Description | |
|---|---|---|
| Account | Service account name that the AF Server is executing under | |
| DefaultPIServerName | Name of the Default PI Server to be associated with this AFServer | |
| Description | Description of the AF Server to be added to the local AF Servers list | |
| Name | Name of the AF Server to be added to the local AF Servers list | |
| Path | Network path of the AF Server to be added to the local AF Servers list. This is the path used when attempting a connection to the AF Server. Note that the network path can be a machine name, IP address, or Fully Qualified Domain Name (FQDN). | |
| Port | TCP port the AF Server is listening on. Typically, this is "5457" | |
| Timeout | Timeout to use when communicating with the AF Server. Should be set with syntax "hh:mm:ss" |
Examples
Add-AFServer -Name PIAF1 -Description "Corporate PI AF Server" -Path PIAF1 -Timeout 00:01:00 -DefaultPIServerName "DEFPISERV"
This example will add an AF Server with name PIAF1 and hostname PIAF1 and default PI server DEFPISERV with a communication timeout of 1 minute. Note that the network path can be a machine name, IP address, or Fully Qualified Domain Name (FQDN).
Examples
Add-AFServer -Name PIAF1 -Description "Corporate PI AF Server" -Path 10.32.58.22
This example will add an AF Server with name PIAF1 and IP address 10.32.58.22 with a communication timeout (not specified) of the global default, which is typically 300 seconds.