v1.1.0
SPSUserSync - Release Notes
[1.1.0] - 2026-06-26
Added
- JSON snapshot history and anomaly detection (
SPSyncUserInfoList.ps1):Backup-SPSJsonFile— archives the previousSPSyncUserInfoListUserList.jsontoLogs\history\with a timestamp before each regeneration.Compare-SPSJsonSnapshots— pure function returningCurrentCount,PreviousCount,Delta,DropPercent,ThresholdPercent,IsAnomalous.- The script now archives the previous snapshot, regenerates, then raises a Warning in the SPSUserSync Event Log when the user count drops by at least
JsonDropThresholdPercent(helps catch an unreachable AD forest or a bad exclusion before the UPA reconciliation runs). - History snapshots are rotated using the existing
Clear-SPSLogFolderwith-Extension '*.json'.
- New settings in
sync-settings.example.psd1(backward-compatible defaults applied when absent):JsonHistoryRetentionDays(default 90)JsonDropThresholdPercent(default 20)GenerateHtmlReport(default$true)
- Self-contained HTML reporting:
Export-SPSUserReport— generates a single dependency-free HTML report (no CDN, works offline) for either dataset via-ReportType UserInfoList|UserProfile. Summary cards plus an interactive table (live search, column sort, pagination) rendered by embedded vanilla JavaScript. All AD-sourced values are HTML-encoded and rendered viatextContent, so names/emails cannot inject markup.SPSyncUserInfoList.ps1writesSPSyncUserInfoListReport-*.html(total users, email coverage, top countries, top AD domains).SPSyncUserProfile.ps1writesSPSyncUserProfileReport-*.html(counts by Status: CREATE / UPDATE / INFO / UNKNOWN_USER).- Reports are rotated with the existing
Clear-SPSLogFolderusing-Extension '*.html', and can be disabled by settingGenerateHtmlReport = $false.
- Pester test suite under
tests/(39 tests, cross-platform):SPSUserSync.Common.Tests.ps1— module import, manifest validity, public/private surface, parameter contractsCompare-SPSJsonSnapshots.Tests.ps1— drop detection, threshold edges, growth, empty-previousBackup-SPSJsonFile.Tests.ps1— timestamped copy, copy-not-move, folder creation, missing source, content preservationExport-SPSUserReport.Tests.ps1— both report types, empty dataset, and an HTML-injection safety testPrivate.Tests.ps1—ConvertFrom-SPSUserLogin,ConvertTo-SPSHtmlEncoded,Get-SPSJsonRecordCountviaInModuleScope
.github/workflows/pester.yml— runs Pester and PSScriptAnalyzer on pull requests touchingsrc/,tests/or the analyzer settings.PSScriptAnalyzerSettings.psd1— analyzer configuration (Error+Warning, withPSUseSingularNounsdisabled for the deliberately pluralCompare-SPSJsonSnapshots/Get-SPSUniqueUsers)..gitattributesand.editorconfig— encode the project's text conventions.
Changed
- All PowerShell files (
*.ps1,*.psm1,*.psd1) are now stored as UTF-8 with BOM and checked out with CRLF, so Windows PowerShell 5.1 reads any non-ASCII content correctly instead of falling back to the ANSI code page. YAML, Markdown and JSON keep LF and no BOM. - Renamed two private report helpers to non-state-changing verbs (
New-SPSReportCard->Get-SPSReportCardHtml,New-SPSReportTopList->Get-SPSReportTopListHtml) to satisfy PSScriptAnalyzer.
A full list of changes in each version can be found in the change log