Public/Get-RdlcDatasetField.ps1
function Get-RdlcDatasetField { param ( [Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName, Position = 0)] [Alias('FullName')] [string[]]$Path ) process { $Path.ForEach{ $CurrentPath = Resolve-Path -Path $_ [xml](Get-Content -Path $CurrentPath) | Select-Object -ExpandProperty Report | Select-Object -ExpandProperty DataSets -ErrorAction SilentlyContinue | Select-Object -ExpandProperty DataSet | ForEach-Object { $DataSetName = $_.Name $_.Fields | Select-Object -ExpandProperty Field | ForEach-Object { [PSCustomObject]@{ PSTypeName = 'UncommonSense.Rdlc.Utils.DataSetField' Path = $CurrentPath DataSetName = $DataSetName Name = $_.Name DataField = $_ | Select-Object -ExpandProperty DataField } } } } } } |