List currently-valid certificates in get-cert-details.cmd #3

Merged
hannah-vernon merged 1 commit from feature/cert-details-current-valid into dev 2026-08-23 09:11:07 -05:00

What does this PR do?

Updates the get-cert-details.cmd helper to list certificates that are valid
as of now rather than using a hardcoded issue-date filter.

The previous version filtered on NotBefore -gt '2026-05-01', a fixed date that
would drift stale over time. The new version selects certificates whose validity
window contains the current moment (NotBefore before now and NotAfter after
now), so the helper stays useful without editing.

Fixes #

How was this tested?

  • Ran the command and confirmed it lists the currently-valid certificates in
    LocalMachine\My with their DnsNameList, validity dates, thumbprint, and subject.

Checklist

  • I have read the Contributing Guide
  • Changes are focused - one logical change per PR
  • Documentation updated (if user-visible behavior changed) - N/A, helper only
  • No commented-out code or debug leftovers
  • No real certificates, keys, or infrastructure names committed
## What does this PR do? Updates the `get-cert-details.cmd` helper to list certificates that are valid **as of now** rather than using a hardcoded issue-date filter. The previous version filtered on `NotBefore -gt '2026-05-01'`, a fixed date that would drift stale over time. The new version selects certificates whose validity window contains the current moment (`NotBefore` before now and `NotAfter` after now), so the helper stays useful without editing. Fixes # ## How was this tested? - [x] Ran the command and confirmed it lists the currently-valid certificates in `LocalMachine\My` with their DnsNameList, validity dates, thumbprint, and subject. ## Checklist - [x] I have read the [Contributing Guide](../CONTRIBUTING.md) - [x] Changes are focused - one logical change per PR - [x] Documentation updated (if user-visible behavior changed) - N/A, helper only - [x] No commented-out code or debug leftovers - [x] No real certificates, keys, or infrastructure names committed
Replace the hardcoded NotBefore date filter (2026-05-01) with a dynamic
window that selects certificates valid as of now (NotBefore before now and
NotAfter after now), so the helper does not drift stale over time.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
hannah-vernon/Install-SqlServerCertificate!3
No description provided.