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

PI Powershell

AddAFServer Class

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

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

SystemObject
  InternalCommand
    Cmdlet
      PSCmdlet
        OSIsoft.PowerShellOSICmdletBase
          OSIsoft.PowerShellAddAFServer

Namespace:  OSIsoft.PowerShell
Assembly:  OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 3.1.1.0 (3.1.1.466)

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

  NameDescription
Public method
AddAFServer

Properties

  NameDescription
Public property
Account

Service account name that the AF Server is executing under

Public property
DefaultPIServerName

Name of the Default PI Server to be associated with this AFServer

Public property
Description

Description of the AF Server to be added to the local AF Servers list

Public property
Name

Name of the AF Server to be added to the local AF Servers list

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

Public property
Port

TCP port the AF Server is listening on. Typically, this is "5457"

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

See Also

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