The first post in this series went up with a warning in the middle of it. In 1.0.1, a SID lookup that failed for any reason counted as proof the SID was orphaned, so a timeout could put a live account’s access on the removal list. I’d filed that as issue #9 the night 1.0.1 shipped and said the fix would come in 1.1.0.

1.1.0 is on the PowerShell Gallery now, and #9 is fixed in it, along with 53 other issues filed between the two releases. This is the last post in the series. It covers the release itself, what changed in numbers, and the list of checks I’d now run on any module of mine before I push a version tag.

I made myself take my time on 1.1.0, because 1.0.1 went out within an hour of the first publish. It’s a lot cleaner than it was.

Shipping 1.1.0

In the release pull request, OrphanedSid.psd1 got ModuleVersion = '1.1.0' and release notes for 1.1.0 alone, 1,303 characters ending with a pointer to the changelog. The CHANGELOG.md entries moved from Unreleased to ## [1.1.0] - 2026-11-11. The command help’s module page got its version and date.

Before the merge, it ran the same checks release day taught me to trust:

  • ./Build/Publish-Module.ps1 -WhatIf staged the package, imported it in a fresh process, checked the exports and every command’s help, and stopped before the upload.
  • The full suite: 1,374 tests passed, 0 failed, on PowerShell 7.6 and Windows PowerShell 5.1, with 94.07% coverage.
  • On the lab DC, the end-to-end harness passed all 77 of its checks under both editions. A removal whose domain controller went down mid-run removed nothing and reported both SIDs as Unverified. The same run against a healthy DC removed both entries after taking a backup.

Then the tag went on the merge commit, release.yml ran the gates again, checked the tag against ModuleVersion, and published. 1.1.0 reached the Gallery at 11:03 PM on November 11, my time, five minutes after the release pull request merged.

One step was still manual. The tag published the module but didn’t create a GitHub release, so the repository page kept showing 1.0.1 as the latest until I made the 1.1.0 release by hand the next morning. The workflow now does it. A new job reads the version’s section from CHANGELOG.md and creates the release from it, and it fails if that section is missing or empty. It builds the notes on dry runs too, so a missing changelog entry shows up before a tag exists.

Every module I publish to the Gallery uses this job now.

From 1.0.1 to 1.1.0

About three days separate the two tags.

1.0.11.1.0
Commits since the previous tag83
Issues filed in between55, of which 54 closed
Private function files5747
Function names in Private, Public and Classes12385
Lines of command, private and class code+1,584, -5,787
Tests2,4671,374
Coverage82.24%94.07%
Detection per object, 5.1, 24-rule user941 ms96 ms

The code got smaller by about 4,200 lines and did more. The suite lost 1,093 tests and gained 12 points of coverage, because the tests that couldn’t fail went and so did the 43 functions nothing called.

The one issue still open at the release was #82: with a domain controller unreachable, every SID that needed a lookup waited out its own 42-second timeout. 1.1.0 cut that from five timeouts per SID to one and left the rest open.

What I check now

Release day was going to end with a list of lessons. I held it for this post, because most of the list came from what happened after 1.0.1. Each item links to the post it came from.

  • A README example is a test I haven’t written yet. The first usage example in the README searched the entire domain for two releases. I’d written that line about a different module less than two weeks before 1.0.0 shipped.
  • Pipe the object your real upstream produces. The unit tests piped strings and [pscustomobject]s. An AD object answers every property name with an empty collection, and only a real one showed it.
  • Run it against a real directory before the tag. 2,400 passing tests missed what the first live run found, and the restore that failed on a single object turned up fifteen minutes after 1.0.0 went up, the first time I ran the README’s rollback.
  • Make every test able to fail. Tests that asserted on simulators, swallowed their own assertions or compared a constant to itself all passed. Break the behavior on purpose and watch the test fail. That’s how you know it means something.
  • Check that a test double behaves like the code it replaces. The stand-in for the removal function returned the three properties the real result didn’t have, which is how an audit entry with three empty fields passed.
  • “Not found” and “couldn’t check” are different answers. A lookup that times out is no evidence. If your tool removes access, it should only act on a lookup that completed.
  • Wrap anything that might be one item in @(). A single string indexed with [0] or [-1] is a character. That gave me a restore of C, a user object of type r, and a junction that resolved to C.
  • Resolve paths the way PowerShell does. [System.IO.Path]::GetFullPath uses the process directory, which Set-Location doesn’t change. $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath uses the current location. A relative restore path pointed at my profile folder because of the first one, and the backup and log fixes use the second for the same reason.
  • Choose once. One backup per object, taken before anything changes. One log file per run, picked before the first line is written. Every bug where a run split across two files came from deciding again partway through.
  • Ask what calls it before fixing it. I fixed a garbage-collection helper on November 10 and deleted it on November 11, because nothing had ever called it.
  • Check the level before you build the line. Half of detection’s time went to formatting Debug lines that were thrown away.
  • Describe what the code does, then file the gap. When a guide and the code disagreed, the guide changed to match the code and the difference became an issue. That pass filed #39 and #40, two of the worst bugs in the series.
  • Publish from the platform the module runs on, and verify the staged copy first. The Gallery doesn’t let you delete a version. The first 1.0.0 tag failed on a Linux runner at the check that proves the staged module works, and nothing was uploaded.

Since 1.1.0

main kept going after the tag: 136 commits and 33 changelog entries, which went to the Gallery as 1.2.0 on November 22.

The rest of #82 is done. After one lookup finds the server unreachable, no directory lookup is attempted for 60 seconds, and the first SID after that tries again. The pull request measured it on the lab DC with five orphaned SIDs and a server that doesn’t answer:

Windows PowerShell 5.1PowerShell 7.6
Before214 s, 5 Unverified213 s, 5 Unverified
After45 s, 5 Unverified45 s, 5 Unverified

The log went from 16 warnings to 9, with one about the server in place of one per SID. The lookup post said #82 was still open. It closed on November 20 and shipped in 1.2.0.

Also in 1.2.0: Restore-OrphanedSidBackup -BackupFile restores one object from one named backup file. A removal that removed less than it was asked to now fails, and a removal lists the entries that were no longer on the object. Objects with escaped characters in their names are reachable on 5.1, wildcard characters in names and paths are taken literally, and the module’s errors come back as error records with IDs of their own.

I won’t bore you with the rest of 1.2.0. It’s all in the changelog.

The series

  1. OrphanedSid: Find, Remove, Restore
  2. Why Find-UnknownSID Left My Monorepo
  3. Moving 2,400 Tests From Pester 3.4 to Pester 6
  4. What 2,400 Tests Couldn’t See
  5. The First CI Run Failed All Three Jobs
  6. Fewer Tests, More Coverage
  7. Docs That Still Described the Script
  8. Release Day: 1.0.0, Then 1.0.1 an Hour Later
  9. A Failed Lookup Isn’t an Orphaned SID
  10. Backups That Couldn’t Undo the Removal
  11. Piping an OU Searched the Entire Domain
  12. One Run, One Log File
  13. Deleting 43 Functions Nobody Called
  14. Half the Time Went to Logs Nobody Read

OrphanedSid is on the PowerShell Gallery and GitHub.