GetAFDatabase Class
- Last UpdatedDec 15, 2025
- 3 minute read
Get an AF Database
The Get-AFDatabase cmdlet will retrieve an AF Database from the specified AF Server.
Inheritance Hierarchy
InternalCommand
Cmdlet
PSCmdlet
OSIsoft.PowerShellOSICmdletBase
OSIsoft.PowerShellGetAFDatabase
Namespace: OSIsoft.PowerShell
Assembly: OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 2.2.3.0 (2.2.3.952)
Syntax
[CmdletAttribute("Get", "AFDatabase", DefaultParameterSetName = "Name", SupportsShouldProcess = true)] public class GetAFDatabase : OSICmdletBase
<CmdletAttribute("Get", "AFDatabase", DefaultParameterSetName := "Name", SupportsShouldProcess := true)> Public Class GetAFDatabase Inherits OSICmdletBase Dim instance As GetAFDatabase
[CmdletAttribute(L"Get", L"AFDatabase", DefaultParameterSetName = L"Name", SupportsShouldProcess = true)] public ref class GetAFDatabase : public OSICmdletBase
[<CmdletAttribute("Get", "AFDatabase", DefaultParameterSetName = "Name", SupportsShouldProcess = true)>] type GetAFDatabase = class inherit OSICmdletBase end
The GetAFDatabase type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| GetAFDatabase |
Properties
| Name | Description | |
|---|---|---|
| AFServer | Name of the AF Server containing the AF Database from | |
| Default | Get the default database from the specified AF Server | |
| ID | GUID of the AF Database to get from the specified AF Server | |
| Index | Index of the AF Database to get from the specified AF Server | |
| Name | Name of the AF Database to get from the specified AF Server | |
| Refresh | Refresh parent before trying to retrieve AF Database |
Examples
Get-AFDatabase -Default -AFServer (Get-AFServer -Default)
This example will get the default AF Database from the default AF Server in the local AF Servers list.
Examples
Get-AFDatabase -Name MyDB -AFServer (Get-AFServer -Name "PIAF1")This example will get the AF Database "MyDB" from the AF Server "PIAF1" in the local AF Servers list.
Examples
Get-AFDatabase -Index 2 -AFServer (Get-AFServer -Name "PIAF1")
This example will get the 3rd AF Database from the AF Server "PIAF1" in the local AF Servers list. Note that the index is zero-based. Therefore, to get the first database, use -Index 0. To get the second database, use -Index 1, etc.