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

PI Powershell

GetAFDatabase Class

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

Get an AF Database

The Get-AFDatabase cmdlet will retrieve an AF Database from the specified AF Server.

Inheritance Hierarchy

SystemObject
  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

  NameDescription
Public method
GetAFDatabase

Properties

  NameDescription
Public property
AFServer

Name of the AF Server containing the AF Database from

Public property
Default

Get the default database from the specified AF Server

Public property
ID

GUID of the AF Database to get from the specified AF Server

Public property
Index

Index of the AF Database to get from the specified AF Server

Public property
Name

Name of the AF Database to get from the specified AF Server

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

See Also

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