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

PI Powershell

GetAFServer Class

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

Get an AF Server connection configuration from local AF Server list

The Get-AFServer cmdlet will retrieve an AF Server/AF Servers from the local AF Server list.

Inheritance Hierarchy

SystemObject
  InternalCommand
    Cmdlet
      PSCmdlet
        OSIsoft.PowerShellOSICmdletBase
          OSIsoft.PowerShellGetAFServer

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

Syntax

[CmdletAttribute("Get", "AFServer", DefaultParameterSetName = "Name", 
	SupportsShouldProcess = true)]
public class GetAFServer : OSICmdletBase
<CmdletAttribute("Get", "AFServer", DefaultParameterSetName := "Name", 
	SupportsShouldProcess := true)>
Public Class GetAFServer
	Inherits OSICmdletBase

Dim instance As GetAFServer
[CmdletAttribute(L"Get", L"AFServer", DefaultParameterSetName = L"Name", 
	SupportsShouldProcess = true)]
public ref class GetAFServer : public OSICmdletBase
[<CmdletAttribute("Get", "AFServer", DefaultParameterSetName = "Name", 
	SupportsShouldProcess = true)>]
type GetAFServer =  
    class
        inherit OSICmdletBase
    end

The GetAFServer type exposes the following members.

Constructors

  NameDescription
Public method
GetAFServer

Properties

  NameDescription
Public property
Default

Get the default AF Server from the local AF Servers list

Public property
ID

GUID of the AF Server to get from the local AF Servers list

Public property
Index

Index of the AF Server to get from the local AF Servers list. The indexing is zero-based.

Public property
Name

Name of the AF Server to get from the local AF Servers list

Public property
Refresh

Refresh parent container before trying to retrieve AF Server

Examples

Get-AFServer

This example will return all locally known AF Servers.

Examples

Get-AFServer -Name PIAF1

This example will return the AF Server "PIAF1" from the locally stored AF Server list.

Examples

Get-AFServer -Default

This example will return the default AF Server from the locally stored AF Server list.

Examples

Get-AFServer -Index 0

This example will return the first AF Server from the locally stored AF Server list. Note that the -Index is zero-based. Therefore, if "Get-AFServer" returns 3 AF Servers. The first is accessed with -Index 0, the second with -Index 1, etc.

See Also

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