manifests/collectors/Identity/ManagedIds.psd1
|
# # GENERATED by scripts/ConvertTo-ScoutCollectorDefinition.ps1 from Modules/Public/InventoryModules/Identity/ManagedIds.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 = @( 'Microsoft.ManagedIdentity/userAssignedIdentities' ) ResourceTypeMatching = 'Grouped' AdditionalFilter = $null FilterPreamble = '' RowLoopVariable = '1' Preamble = @' $ResUCount = 1 $SubId = $1.id.split('/')[2] $sub1 = $SUB | Where-Object { $_.id -eq $SubId } $data = $1.PROPERTIES $Tags = if(![string]::IsNullOrEmpty($1.tags.psobject.properties)){$1.tags.psobject.properties}else{'0'} '@ AdditionalRowLoops = @() TagLoop = @{ Variable = 'Tag' Source = '$Tags' Preamble = '' } Fields = @( @{ Name = 'ID' Expression = '$1.id' } @{ Name = 'Subscription' Expression = '$sub1.Name' } @{ Name = 'Name' Expression = '$1.Name' } @{ Name = 'Location' Expression = '$1.location' } @{ Name = 'Principal ID' Expression = '$data.principalId' } @{ Name = 'Client ID' Expression = '$data.clientId' } @{ Name = 'Resource U' Expression = '$ResUCount' } @{ Name = 'Tag Name' Expression = '[string]$Tag.Name' } @{ Name = 'Tag Value' Expression = '[string]$Tag.Value' } ) Export = @{ WorksheetName = 'Managed Identity' TableNamePrefix = 'ManIdTable_' Columns = @( 'Subscription' 'Name' 'Location' 'Principal ID' 'Client ID' ) TagColumns = @( 'Tag Name' 'Tag Value' ) TagColumnsBefore = $null NumberFormat = '0' ConditionalText = @() } SourceCollector = 'Modules/Public/InventoryModules/Identity/ManagedIds.ps1' } |