Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [3.4.0] - 2026-09-30

### Added

- SPSCleanVersions.ps1
Expand Down
23 changes: 11 additions & 12 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
# SPSCleanVersions - Release Notes

## [3.3.1] - 2026-09-30
## [3.4.0] - 2026-09-30

### Fixed
### Added

- SPSCleanVersions.ps1
- **JIT `AddSiteCollectionAdmin` — false-positive "already admin" fixed.** The pre-flight check now
confirms the operator's UPN is actually in the site collection admin list before deciding it is
"already admin" (reading the list is no longer treated as proof). Sites where the operator could
read the admin list without being an effective admin (e.g. a Microsoft 365 group member) are no
longer skipped and left in `Access denied`. As a safety net, a site that still denies a privileged
operation despite looking already-administered is granted JIT admin and retried once, then revoked.
- **Batch delete "already in progress" no longer wastes retries.** When a prior file-version
batch-delete job is still running on a site, the rejection is detected and skipped (a benign
"already in progress" message) instead of being retried 5× with exponential backoff (~5 min/site)
and logged as `FAILED`.
- **Colourized console output** — per-site lines carry coloured status tags: site (cyan),
grant/revoke (`[jit ]`, magenta), applied (`[ ok ]`, green), skipped/compliant (`[skip]`, grey),
`[warn]` / `[deny]` — plus a framed end-of-run **summary** block. Colour is ANSI via `$PSStyle`,
shown **only** on an interactive VT-capable console; Azure Automation, redirected/piped output and
non-VT hosts get a plain ASCII fallback, and `Start-Transcript` records the `.log` without ANSI
(`OutputRendering = 'Host'`). `results.json` and the HTML report are unchanged, and the
machine-readable `--- SPSCleanVersions finished: … ---` anchor line is kept.
- **Per-site progress bar** (`Write-Progress`, `Site X of N` + percent) for local/interactive runs;
suppressed under Azure Automation.


A full list of changes in each version can be found in the [change log](CHANGELOG.md)
6 changes: 3 additions & 3 deletions scripts/SPSCleanVersions.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<#PSScriptInfo
.VERSION 3.3.1
.VERSION 3.4.0

.GUID 7ecf4acd-17c4-4c50-be79-1fcf2b6611fe

Expand Down Expand Up @@ -120,7 +120,7 @@
FileName: SPSCleanVersions.ps1
Author: Jean-Cyril DROUHIN
Date: September 29, 2026
Version: 3.3.1
Version: 3.4.0

.LINK
https://spjc.fr/
Expand Down Expand Up @@ -789,7 +789,7 @@ function Clear-OldRunFiles {
# Run context: local writes transcript + report files; Azure Automation emits the report
# into the output stream (no persistent filesystem).
$script:IsAzureAutomationRun = Test-IsAzureAutomation
$script:ScriptVersion = '3.3.1'
$script:ScriptVersion = '3.4.0'
$script:RunTimestamp = Get-Date -Format 'yyyy-MM-dd_HHmmss'
$script:LogsFolder = $null
$script:ResultsFolder = $null
Expand Down
Loading