APPX Software Library

Chapter 7: Read APPX Data with 64-bit PowerShell

Summarize and Check the Returned Data

Use PowerShell for a small analysis after obtaining $rows. This does not change the APPX file:

$rows | Measure-Object -Property no_words -Sum -Minimum -Maximum
$rows | Group-Object -Property { $_.region_label.TrimEnd() } |
    Sort-Object Name | Select-Object Name, Count
$rows | Where-Object { $_.no_words -ge 2 } |
    Select-Object name, no_words

For this eight-record sample, no_words sums to 10, with minimum 0 and maximum 2. Observed region keys are C (4), P (1), S (2) and blank (1), reflecting damaged text. The numeric-only local filter selects the three records whose names display C, N and U; consult the native expected CSV for their full names. The grouping trims trailing padding only for the grouping key; the original $rows remain intact.

A second query can be compared with the earlier snapshot:

$again = @(.\read-appx-odbc-64.ps1 -Credential $credential)
Compare-Object -ReferenceObject $rows -DifferenceObject $again `
    -Property name, region_label, city_sep_line, no_words, post_code_loc, added_by, date_added, changed_by, date_changed

No output means the selected nine fields agree between these two ODBC reads. It does not independently prove the APPX-to-SQL mapping. The native APPX comparison remains the check for that. If APPX users change records between reads, differences can be expected.