Releases: luigilink/SPSUpdate
Release list
v4.2.0
SPSUpdate - Release Notes
[4.2.0] - 2026-06-30
This release adds a near real-time patching dashboard: while a cumulative update is rolled
out across the farm, SPSUpdate records the progress of every phase into a shared status
store and the master assembles a self-contained, auto-refreshing HTML dashboard.
Added
- Status store and dashboard functions:
Set-SPSUpdateStatus/Get-SPSUpdateStatus
(atomic per-scope JSON store, each writer owns its file),Get-SPSStatusCampaignPath
(resolves<root>\<App>-<Env>-<Farm>), andExport-SPSUpdateProgressReport(renders a
self-contained HTML dashboard with overall state, per-phase sections, colored state
badges, per-item exit codes and per-sequence percentage; meta-refresh while running). - New optional
StatusStorePathconfig key (UNC share) with a localResults\status
fallback. - New
-Action ResetStatusto clear a campaign before a fresh patching round. SPSUpdate.ps1is instrumented end-to-end: ProductUpdate per server (per-setup-file
items), the four mount/upgrade sequences (per-database items and a running percentage),
the Configuration Wizard per server (local and remote), and side-by-side. The master
regenerates the dashboard on every wait-loop iteration and writes a final completed
dashboard with auto-refresh off.- New
Test-SPSUpdateReadiness.ps1pre-flight check (module, config, DPAPI secret,
elevation, status store write access, per-server CredSSP reachability). The status store
check probes write access both as the current user and as the InstallAccount, since the
upgrade sequences run as the service account and only appear on the dashboard when it can
write to the share. - The dashboard collapses finished scopes (Done/Skipped) by default and keeps active ones
expanded (native<details>/<summary>, accessible, no JS); each collapsed line still
shows its badge, percentage and anN/M donecount. - Real process exit codes are surfaced: the ProductUpdate item's Exit column shows the
setup.exe code (0,17022= reboot required, ...), and the Configuration Wizard records
the psconfig.exe code in its detail (PSConfig completed (exit 0)).
How to use
- Set
StatusStorePathto a UNC share writable by the InstallAccount from every server
(grant it Modify on the SMB share and NTFS — the sequence tasks run as that account). - Run
Test-SPSUpdateReadiness.ps1to confirm the environment (both write probes green). SPSUpdate.ps1 -ConfigFile '<farm>.psd1' -Action ResetStatusto start a clean campaign.- Open
<StatusStorePath>\<App>-<Env>-<Farm>\_dashboard.htmlin a browser. - Run
-Action ProductUpdateon each server, then the default master run; watch the
dashboard update itself.
Changed
- Bumped the module manifest to
4.2.0and exported the new functions.
Notes
- Validated end-to-end on a real three-server Subscription Edition farm with an actual
cumulative update (binary install, parallel content-database upgrade, and the post-setup
Configuration Wizard, all reflected live on the dashboard).
A full list of changes in each version can be found in the change log
v4.1.0
SPSUpdate - Release Notes
[4.1.0] - 2026-06-29
This release adds a self-contained HTML report for the ContentDatabase inventory, in the
same spirit as the SPSUserSync reports. It builds on the v4.0.0 modernization and is fully
backward compatible.
Added
- New public function
Export-SPSUpdateDbReportthat renders the ContentDatabase inventory (<App>-<Env>-<Farm>-ContentDBs.json) as a self-contained, offline HTML report: summary cards (total databases, total size, balance spread), the per-sequence LPT distribution (count / size / percentage bars), and a sortable, filterable table of every database. Inventories generated before v4.1.0 (no size) still render and fall back to distributing by database count. SPSUpdate.ps1now writes the HTML report under a newResults\folder whenever the inventory is (re)generated (theInitContentDBaction and the Default-mode prime). Report failures warn but never block the run.- Private report helpers:
ConvertTo-SPSHtmlEncoded,Get-SPSReportCardHtml,Get-SPSReportHtmlHead,Get-SPSReportDistributionHtml,Get-SPSReportHtmlScript.
Changed
Initialize-SPSContentDbJsonFilenow persistsSizeInBytesandSizeInMBfor each database in the inventory JSON. This is backward compatible: the mount/upgrade flow still reads onlyName,WebAppUrlandServer.- Bumped the module manifest to
4.1.0and exportedExport-SPSUpdateDbReport.
Notes
- An inventory produced by v4.0.0 (without size) renders correctly; regenerate it with
-Action InitContentDBto get the size columns and size-based balancing in the report.
A full list of changes in each version can be found in the change log
v4.0.0
SPSUpdate - Release Notes
[4.0.0] - 2026-06-29
This is a major modernization release that aligns SPSUpdate with the SPSWeather and
SPSUserSync projects. It is a breaking release: the package layout, the configuration
format and the credential storage all change. Review the migration notes below before
upgrading an existing deployment.
Added
- New
SPSUpdate.CommonPowerShell module (src/Modules/SPSUpdate.Common) with a manifest-driven version, a dot-sourcing loader, and a one-file-per-function layout split intoPublic/andPrivate/. - DPAPI credential store:
Get-SPSSecret/Set-SPSSecretpersist theInstallAccountas an encrypted SecureString inConfig\secrets.psd1, replacing the Windows Credential Manager module.-Action Installwrites the secret and-Action Uninstallremoves it. - Tolerant configuration loader: optional keys fall back to safe defaults (
Binaries.ProductUpdate,Binaries.ShutdownServicesandUpgradeContentDatabasedefault to$true;MountContentDatabaseandSideBySideToken.Enabledefault to$false). - Repository scaffolding aligned with the other SPS* projects:
.editorconfig,.gitattributes(UTF-8 BOM + CRLF for PowerShell files),PSScriptAnalyzerSettings.psd1, and an expanded.gitignore. - Wiki: new
Release-Processpage and_Sidebar.mdnavigation. - Offline install guide (
src/SPSUpdate_README.md) shipped inside the release ZIP, rewritten for the psd1 config, the DPAPI secret store and theModules\layout (no DSC).
Changed
- BREAKING — Project layout moved from
scripts/tosrc/. The release ZIP now packages the contents ofsrc/, so the archive extracts straight toSPSUpdate.ps1,Config\andModules\(no wrapper folder). - BREAKING — Environment configuration moved from JSON to a PowerShell data file (
*.psd1), read withImport-PowerShellDataFile. A single documented template (Config\CONTOSO-PROD.example.psd1) lists every option with its possible values inline. Runtime/output files (the ContentDB inventory and logs) stay JSON by design. - BREAKING — The config key
StoredCredentialis renamed toCredentialKeyand now points at an entry inConfig\secrets.psd1instead of a Windows Credential Manager target. SPSUpdate.ps1now importsSPSUpdate.Common, derives its version banner from the module manifest, and reads/writes the InstallAccount credential throughGet-SPSSecret/Set-SPSSecret.Add-SPSUpdateEventis now self-contained (version/user resolved from the module) and re-points a mis-mapped event source to theSPSUpdatelog instead of returning silently.- CI:
release.ymlzips the contents ofsrc/;pester.ymltriggers onsrc/**,tests/**andPSScriptAnalyzerSettings.psd1, and runs PSScriptAnalyzer againstsrc/SPSUpdate.ps1and theSPSUpdate.Commonmodule. README.mdtrimmed to a short overview with quick links; the wiki (Home,Getting-Started,Configuration,Usage) rewritten for the new layout, psd1 config and DPAPI secret store.
Fixed
Invoke-SPSCommandnow fails fast when the CredSSPNew-PSSessioncannot be established (-ErrorAction Stop+ a clearthrow) instead of falling back to running the SharePoint scriptblock locally on the master server with no session — which previously made PSConfig and side-by-side operations silently target the wrong server. Added anOpenTimeoutand clearer remote-failure error messages, aligned with the SPSWeather hardening.
Removed
- BREAKING — The bundled third-party
credentialmanagermodule (DLLs + manifest) and allGet-/New-/Remove-StoredCredentialusage. - The legacy
scripts/tree, including the flatutil.psm1/sps.util.psm1helpers and the per-farm JSON configs.
Migration from 3.x
- Convert each JSON config to a
*.psd1file (seeConfig\CONTOSO-PROD.example.psd1) and renameStoredCredentialtoCredentialKey. - Re-run
.\SPSUpdate.ps1 -ConfigFile '<farm>.psd1' -Action Install -InstallAccount (Get-Credential)as the service account to store the credential inConfig\secrets.psd1(the previous Credential Manager entry is no longer used). - Extract the new ZIP on each server; it unpacks to
SPSUpdate.ps1,Config\andModules\directly.
A full list of changes in each version can be found in the change log
v3.2.1
SPSUpdate - Release Notes
[3.2.1] - 2026-06-11
Changed
scripts/Modules/sps.util.psm1:
Initialize-SPSContentDbJsonFilenow distributes content databases across the four sequences using a Longest Processing Time First (LPT) algorithm based onDiskSizeRequired, instead of splitting them evenly by count (floor(count / 4)). Sequences are now balanced by total database size so parallel upgrade workloads finish closer to the same time.Initialize-SPSContentDbJsonFilenow prints a distribution report to the transcript showing the count, total size (MB) and percentage for each of the four sequences.Initialize-SPSContentDbJsonFilenow also writes a timestamped snapshot of the inventory (<basename>_yyyy-MM-dd_HH-mm-ss.json) next to the canonical file each time it runs. The canonical file (consumed bySPSUpdate.ps1) is still overwritten in place, while the dated snapshots accumulate inscripts/Config/so previous inventories can be reviewed or restored. Snapshot failures are logged viaWrite-Verboseand never block the canonical write.Start-SPSProductUpdatenow invokes the SharePoint patch setup with/passiveinstead of/quiet./passivestill runs the patch without user interaction but displays a progress UI, which gives administrators visibility on the installation progress when the script is run interactively. Behavior of the returned exit code and the post-install service-restoration logic is unchanged.
scripts/SPSUpdate.ps1:
- Bumped
$SPSUpdateVersionto3.2.1.
Fixed
scripts/Modules/sps.util.psm1:
- Fixed
Initialize-SPSContentDbJsonFileedge case where fewer than 4 content databases causedgroupSizeto evaluate to0, dumping every database intoSPContentDatabase4and leavingSPContentDatabase1..3empty.
Tests
tests/Modules/sps.util.Tests.ps1:
- Added Pester tests for
Initialize-SPSContentDbJsonFilecovering: no file written whenGet-SPContentDatabasereturns$null, fair distribution of fewer than 4 databases (regression for thefloor(count / 4)bug), LPT balancing by size (the largest database lands alone in its sequence), and theSPContentDatabase1..4JSON property contract consumed bySPSUpdate.ps1.
A full list of changes in each version can be found in the change log
v3.2.0
SPSUpdate - Release Notes
[3.2.0] - 2026-05-26
Added
scripts/SPSUpdate.ps1:
- Added new
InitContentDBvalue for theActionparameter that (re)generates the ContentDatabase inventory JSON file for the local farm. Intended to be run on the source farm before a farm upgrade (for example SharePoint Server 2019 → Subscription Edition). - Added new
MountContentDatabaseconfiguration property in the JSON config file. Whentrue, the master server iterates through the ContentDatabase inventory JSON file and mounts every database that is not already attached to the farm. Mounts are performed sequentially to avoid concurrent writes to the configuration database. - Loader of the ContentDatabase inventory JSON file now also runs when
MountContentDatabaseistrue(previously only whenUpgradeContentDatabasewastrue). - Added dedicated transcript log file naming for the
InitContentDBaction.
scripts/Modules/sps.util.psm1:
- Added
Mount-SPSContentDatabasewrapper aroundMount-SPContentDatabase. The wrapper validates the target web application, skips databases that are already attached, and accepts an optionalDatabaseServerparameter.
tests/SPSUpdate.Tests.ps1:
- Added assertions for the new
InitContentDBaction and theMountContentDatabaseflow. - Added regression test that the ProductUpdate flow no longer calls
Test-SPSPendingReboot.
tests/Modules/sps.util.Tests.ps1:
- Added tests for
Mount-SPSContentDatabase(export, parameters, idempotency when the DB is already attached, mounting when missing, error when the web application is not found).
Changed
scripts/SPSUpdate.ps1:
- Bumped
$SPSUpdateVersionto3.2.0. - Removed the blocking pending-reboot check from the
ProductUpdateaction. On production farms the Windows reboot markers (Component Based Servicing,PendingFileRenameOperations, etc.) commonly remain set after several reboots, which was causing legitimate updates to be aborted. TheTest-SPSPendingReboothelper is kept available inutil.psm1for ad-hoc usage.
Documentation
- Updated
scripts/SPSUpdate_README.md,wiki/Configuration.mdandwiki/Usage.mdto document the newInitContentDBaction, the newMountContentDatabaseJSON property and the removal of the blocking pending-reboot check fromProductUpdate.
A full list of changes in each version can be found in the change log
v3.1.1
SPSUpdate - Release Notes
[3.1.1] - 2026-05-11
Added
scripts/Modules/util.psm1:
- Added
Test-SPSPendingRebootto detect pending reboot state using multiple Windows markers (Windows Update, CBS, pending file rename, pending computer rename, and ConfigMgr).
scripts/Modules/sps.util.psm1:
- Added missing
Clear-ComObjecthelper used byGet-SPSLocalVersionInfoto safely release COM objects.
tests/Modules/util.Tests.ps1:
- Added tests for
Test-SPSPendingRebootand module export validation for the new helper. - Added regression tests for
Start-SPSScheduledTaskTaskPathparameter support and task path normalization behavior.
tests/Modules/sps.util.Tests.ps1:
- Added regression test ensuring
Start-SPSProductUpdateno longer exposesInstallAccount.
tests/SPSUpdate.Tests.ps1:
- Added assertions for consolidated reboot detection (
Test-SPSPendingReboot) in ProductUpdate flow. - Added regression assertion to prevent reintroduction of legacy ProductUpdate MOF cleanup code.
Fixed
scripts/Modules/util.psm1:
- Fixed
Start-SPSScheduledTaskto supportTaskPathand use that path when resolving and starting tasks. - Normalized scheduled task paths to the expected
\<TaskPath>format forGet-ScheduledTaskandStart-ScheduledTask. - Changed
Add-SPSScheduledTaskbehavior to create or update existing tasks instead of skipping them.
scripts/Modules/sps.util.psm1:
- Fixed runtime failure in
Get-SPSLocalVersionInfowhenClear-ComObjectwas missing.
scripts/SPSUpdate.ps1:
- Updated ProductUpdate to run update binaries without
InstallAccount. - Replaced single reboot check with consolidated reboot detection and detailed marker reporting.
- Removed legacy ProductUpdate
finallyblock used for old DSC MOF cleanup. - Enabled script-level verbose forwarding (
-Verbose) to downstream module cmdlets. - Added transcript file path output (
Transcript log file: ...) at startup for easier log discovery. - Updated installed SharePoint version output to print
FileVersionexplicitly.
Changed
Documentation:
- Updated ProductUpdate examples and guidance to remove
InstallAccountrequirement. - Removed stale references to temporary MOF cleanup after ProductUpdate.
A full list of changes in each version can be found in the change log
v3.1.0
SPSUpdate - Release Notes
[3.1.0] - 2026-05-07
Added
tests/Modules/util.Tests.ps1:
- New Pester test suite for util.psm1 module with 11 test cases
- Module loading validation tests
- Tests for Get-SPSInstalledProductVersion function (callable, return type validation)
- Tests for Add-SPSUpdateEvent function with parameter validation (Message/Source mandatory, EntryType/EventId optional)
- Tests for Invoke-SPSCommand function structure validation (Credential, Server, ScriptBlock parameters)
tests/Modules/sps.util.Tests.ps1:
- Comprehensive Pester test suite for sps.util.psm1 with 4 test cases
- Get-SPSLocalVersionInfo: Tests DisplayVersion fallback when patch metadata is missing
- Start-SPSProductUpdate: Tests file blocking detection with Add-SPSUpdateEvent logging
- Start-SPSProductUpdate: Tests exit code reporting ($setupInstall.ExitCode)
- Start-SPSProductUpdate: Tests service startup type restoration with SP 2015/2019 compatibility
tests/SPSUpdate.Tests.ps1:
- Main script validation test suite with expanded coverage for script structure, task handling, and event logging
- File validation: Existence, file extension matching, PowerShell syntax validation
- Content validation: param block, script version declaration, module imports (util, sps.util), Start-Transcript logging, try-catch error handling, Administrator privilege checks
- Dependency validation: Module files (util.psm1, sps.util.psm1), folders (credentialmanager, Config), sample JSON configuration files
- Configuration file validation: JSON validity, required ConfigurationName property
- Scheduled task validation: task name constants, task existence checks, TaskPath usage, and default action task management patterns
- Error logging validation: catchMessage pattern and Add-SPSUpdateEvent coverage for initialization, task scheduling, product update, credential, and configuration wizard failures
Fixed
scripts/Modules/util.psm1:
- Get-SPSInstalledProductVersion: Changed return type from string to System.Diagnostics.FileVersionInfo object to enable proper version property access (ProductMajorPart, ProductBuildPart)
scripts/Modules/sps.util.psm1:
- Get-SPSLocalVersionInfo (Lines 393-502): Fixed uninitialized $versionInfo variable by adding proper initialization in all code paths (if block, catch block, fallback assignments)
- Start-SPSProductUpdate (Lines 494-647): Fixed incorrect variable name $setup.ExitCode → $setupInstall.ExitCode for accurate error code reporting
- Start-SPSProductUpdate: Fixed version detection to use ProductMajorPart property instead of non-existent FileMajorPart on FileVersionInfo object
- Start-SPSProductUpdate (Lines 838-851): Fixed service restoration logic to use original $service.StartType from saved JSON instead of forcing all services to Disabled startup type
- Start-SPSProductUpdate (Lines 693-710): Removed misleading exception placeholder from blocked-file error message for clearer error reporting
- Start-SPSProductUpdate: Added credentialed Start-Process execution with Windows identity safety guard for cross-platform compatibility
scripts/SPSUpdate.ps1:
- Added Test-ConfigurationFile to validate JSON structure and required configuration properties before execution
- Centralized scheduled task names and task folder path into script-scoped constants
- Added scheduled task existence checks before recreating full and sequence tasks
- Standardized catch blocks around key operations by composing catchMessage strings and logging failures through Add-SPSUpdateEvent
- Extended task handling in Default mode to use task variables, TaskPath, and event logging consistently
Changed
.github/workflows/pester.yml:
- Updated PSScriptAnalyzer code quality step to exclude credentialmanager folder (third-party dependency)
- Filter implemented: Get-ChildItem excludes files matching 'credentialmanager' pattern before analysis
- Improved CI/CD reliability by preventing false positives from third-party code analysis
README.md and wiki/Getting-Started.md:
- Removed outdated SharePointDsc and DSC-based prerequisite/setup guidance
- Updated documentation to describe native
ProductUpdateexecution of SharePoint update binaries - Replaced the DSC CredSSP example with direct PowerShell CredSSP configuration commands
A full list of changes in each version can be found in the change log
v3.0.3
SPSUpdate - Release Notes
[3.0.3] - 2025-11-05
Changed
scripts\SPSUpdate.ps1:
- Add ErrorAction SilentlyContinue in LanguagePackInstalled registry
Added
scripts/SPSUpdate_README.md:
- Resolve Documentation Request: Add readme file for offline installation (issue #8).
A full list of changes in each version can be found in the change log
v3.0.2
SPSUpdate - Release Notes
[3.0.2] - 2025-10-17
Changed
scripts\SPSUpdate.ps1:
- Cleanup DSC Mof files after installation of Cumulative Updates
- Check patch status before running SPConfig.exe
scripts\Modules\sps.util.psm1:
- Refactor Get-SPSServersPatchStatus and Start-SPSConfigExe functions
A full list of changes in each version can be found in the change log
v3.0.1
SPSUpdate - Release Notes
[3.0.1] - 2025-10-17
Changed
scripts\SPSUpdate.ps1:
- Change credential variable with InstallAccount variable in ProductUpdate Section
scripts\Modules\sps.util.psm1:
- Fix Exception: The term 'Localhost' is not recognized as the name of a cmdlet
A full list of changes in each version can be found in the change log