Public/Get-BcAppObject.ps1

<#
.EXAMPLE
$Symbols = Get-BcAppSymbolReference -Path ~/Desktop/MyApp.app | ConvertFrom-Json
Get-BcAppObject -SymbolReference $Symbols -ObjectType Table
#>

function Get-BCAppObject
{
    param
    (
        [Parameter(Mandatory, Position = 0)]
        $SymbolReference,

        [Parameter(Mandatory, Position = 1)]
        [ValidateSet('Table', 'Page', 'Report', 'Codeunit', 'XmlPort', 'Query', 'MenuSuite')]
        [string]$ObjectType,

        [Parameter(Position = 2)]
        [ValidateRange(1, [int]::MaxValue)]
        [int]$FromObjectID = 1,

        [Parameter(Position = 3)]
        [ValidateRange(1, [int]::MaxValue)]
        [int]$ToObjectID = [int]::MaxValue
    )

    $SelectedObjectType = switch ($ObjectType)
    {
        'Query' { 'Queries' }
        default { "$($ObjectType)s" }
    }

    $SymbolReference.ForEach{
        $_
        | Select-Object -ExpandProperty $SelectedObjectType
        | Where-Object ID -GE $FromObjectID
        | Where-Object ID -LE $ToObjectID
        | ForEach-Object {
            [PSCustomObject]@{
                PSTypeName = 'UncommonSense.Bc.DataModel.Object'
                Type       = $ObjectType
                ID         = $_.ID
                Name       = $_.Name
            }
        }
    }
}