From b7c22e1988394e56fd1c2f793f0c404961aca297 Mon Sep 17 00:00:00 2001 From: Spencer McGuire Date: Sun, 18 Oct 2026 21:50:34 -0600 Subject: [PATCH] scripts: vsql certificate script recovery paths from the second review - A rollback record now says which restarts succeeded. A snapshot stays open while an instance is unrestored or its restart failed (or was declined), so -Rollback -RestartInstances retries exactly those instead of reporting done or stepping back to an older deployment. - Running dependents (SQL Server Agent) are written to dependents-.json before the stop and removed once they run again, so a failed restart does not leave Agent stopped for good. - GetRegValue returns $null only for a value confirmed absent; a missing key or read error throws, so it is never snapshotted or verified as absent. - Instances come from the value names of Instance Names\SQL; the 'PS*' filter dropped names such as PSREPORTING. Tests for each, including the real registry operations on an HKCU test key. Pester green on PowerShell 7.6 (63) and Windows PowerShell 5.1 (62, 1 skipped). Co-Authored-By: Claude Opus 5.5 --- docs/DEPLOY.md | 2 +- scripts/README.md | 7 +- scripts/Request-VsqlServerCertificate.ps1 | 112 +++++++++++----- .../Request-VsqlServerCertificate.Tests.ps1 | 122 +++++++++++++++++- 4 files changed, 204 insertions(+), 39 deletions(-) diff --git a/docs/DEPLOY.md b/docs/DEPLOY.md index 8ca797d..ce9c4b4 100644 --- a/docs/DEPLOY.md +++ b/docs/DEPLOY.md @@ -229,7 +229,7 @@ Docker's default address pool on docker-1 holds fifteen /16 bridge networks (172 Check the ERRORLOG line again. The production stack's own doctor run is Spencer's, with its own approval. -6. Rollback. Each deployment saved `deploy-