GetAFServer Class
- Last UpdatedDec 15, 2025
- 3 minute read
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
InternalCommand
Cmdlet
PSCmdlet
OSIsoft.PowerShellOSICmdletBase
OSIsoft.PowerShellGetAFServer
Namespace: OSIsoft.PowerShell
Assembly: OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 3.1.1.0 (3.1.1.466)
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
| Name | Description | |
|---|---|---|
| GetAFServer |
Properties
| Name | Description | |
|---|---|---|
| Default | Get the default AF Server from the local AF Servers list | |
| ID | GUID of the AF Server to get from the local AF Servers list | |
| Index | Index of the AF Server to get from the local AF Servers list. The indexing is zero-based. | |
| Name | Name of the AF Server to get from the local AF Servers list | |
| 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 0This 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.