Public/Get-Config.ps1

<#
    .SYNOPSIS
    Returns the current configuration for accessing the salesforce org and cdr/pds instance

    .INPUTS
    None. You cannot pipe objects to Convert-CsvToMessages.

    .OUTPUTS
    The current configured PSCustomObject
#>

function Get-Config {

    [CmdletBinding()]
    [OutputType([PSCustomObject])]
    param()

    begin {
        Write-Verbose "[$($MyInvocation.MyCommand.Name)] Function started"
    }

    end {
        Write-Verbose "[$($MyInvocation.MyCommand.Name)] Complete"
    }

    process {
        Write-Debug "[$($MyInvocation.MyCommand.Name)] PSBoundParameters: $($PSBoundParameters | Out-String)"

        Get-Variable -Name __config -Scope Script -ValueOnly -ErrorAction SilentlyContinue
    }
}