Public/Get-DBALibraryConfig.ps1

function Get-DBALibraryConfig {
    <#
    .SYNOPSIS
        Gets the current SqlBackupRestoreTools session configuration.
 
    .DESCRIPTION
        Returns the current in-session configuration values used by BackupAndRestore for optional
        database-backed logging and email delivery.
 
        This module retains the legacy DBALibrary config cmdlet names for backward compatibility.
 
    .OUTPUTS
        System.Management.Automation.PSCustomObject
 
    .EXAMPLE
        Get-DBALibraryConfig
 
        Shows the current DBA instance/database and SMTP settings.
    #>

    [CmdletBinding()]
    param()

    [pscustomobject]@{
        DBAInstance  = $script:DBAInstance
        DBADatabase  = $script:DBADatabase
        SmtpServer   = $script:smtpserver
        SMTPEnabled  = [bool]$script:SMTPEnabled
    }
}