manifests/collectors/Compute/AVDApplications.psd1

#
# GENERATED by scripts/ConvertTo-ScoutCollectorDefinition.ps1 from Modules/Public/InventoryModules/Compute/AVDApplications.ps1 (AB#5660).
# Field expressions are copied verbatim from the original collector and evaluate in an
# equivalent scope -- see docs/design/decisions/declarative-collectors.md.
# Review before trusting; regenerate rather than hand-patch if the source collector changes.
#
@{
    ResourceTypes = @(
        'AZSC/ARMChild/AVDApplications'
    )

    ResourceTypeMatching = 'Grouped'

    AdditionalFilter = $null

    FilterPreamble = ''

    RowLoopVariable = '1'

    Preamble = @'
$ag = $Resources | Where-Object { $_.id -eq $1.PARENTID } | Select-Object -First 1
                        $sub1 = $SUB | Where-Object { $_.Id -eq $1.subscriptionId }
                        $ResUCount = 1
                        $aProp = $1.properties
'@


    AdditionalRowLoops = @()

    TagLoop = $null

    Fields = @(
        @{
            Name = 'App Group Name'
            Expression = '$ag.NAME'
        }
        @{
            Name = 'Subscription'
            Expression = '$sub1.Name'
        }
        @{
            Name = 'Resource Group'
            Expression = '$ag.RESOURCEGROUP'
        }
        @{
            Name = 'Application Name'
            Expression = '$1.name'
        }
        @{
            Name = 'Friendly Name'
            Expression = 'if ($aProp.friendlyName) { $aProp.friendlyName } else { ''N/A'' }'
        }
        @{
            Name = 'Description'
            Expression = 'if ($aProp.description) { $aProp.description } else { ''N/A'' }'
        }
        @{
            Name = 'App Alias'
            Expression = 'if ($aProp.applicationType) { $aProp.applicationType } else { ''N/A'' }'
        }
        @{
            Name = 'Executable Path'
            Expression = 'if ($aProp.filePath) { $aProp.filePath } else { ''N/A'' }'
        }
        @{
            Name = 'Command Line Setting'
            Expression = 'if ($aProp.commandLineSetting) { $aProp.commandLineSetting } else { ''N/A'' }'
        }
        @{
            Name = 'Command Line Arguments'
            Expression = 'if ($aProp.commandLineArguments) { $aProp.commandLineArguments } else { ''N/A'' }'
        }
        @{
            Name = 'Icon Path'
            Expression = 'if ($aProp.iconPath) { $aProp.iconPath } else { ''N/A'' }'
        }
        @{
            Name = 'Show In Portal'
            Expression = 'if ($aProp.showInPortal -eq $true){ ''Yes'' } else { ''No'' }'
        }
        @{
            Name = 'Resource U'
            Expression = '$ResUCount'
        }
        @{
            Name = 'Tag Name'
            Expression = ''''''
        }
        @{
            Name = 'Tag Value'
            Expression = ''''''
        }
    )

    Export = @{
        WorksheetName = 'AVD Applications'
        TableNamePrefix = 'AVDApplicationsTable_'
        Columns = @(
            'App Group Name'
            'Subscription'
            'Resource Group'
            'Application Name'
            'Friendly Name'
            'Description'
            'Executable Path'
            'Command Line Setting'
            'Command Line Arguments'
            'Icon Path'
            'Show In Portal'
            'Resource U'
        )
        TagColumns = @()
        TagColumnsBefore = $null
        NumberFormat = '0'
        ConditionalText = @()
    }

    SourceCollector = 'Modules/Public/InventoryModules/Compute/AVDApplications.ps1'
}