Document New-Guid UUID v7 default change#12888
Document New-Guid UUID v7 default change#12888SufficientDaikon wants to merge 1 commit intoMicrosoftDocs:mainfrom
Conversation
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
Learn Build status updates of commit 6421b44: ✅ Validation status: passed
For more details, please refer to the build report. |
|
@sdwheeler — This addresses #12884 and your comment requesting What's included:
What's intentionally not included:
The engine PR (PowerShell/PowerShell#27033) is still open. This docs PR can be held until it merges. |
|
@SufficientDaikon Thanks for the PR. Since this is a breaking change, it won't ship in 7.6, which is an LTS release. Once it gets merged, it would ship in the next v7.7 preview release. For this command reference update, that would need to happen in the |
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
okay, i understand, thanks for the comment, i'm just trying to make it easy for you to read and parse the PR and have it have everything so it's a simple merge request that doesn't break things, because some of these changes i really need in what i'm making and i've been having alot of issue with powersell |
|
Learn Build status updates of commit f698527: ✅ Validation status: passed
For more details, please refer to the build report. |
|
Thanks for the clarification @sdwheeler — that makes sense. I'll retarget this to I've set up a watch on the upstream repo so I can update the branch promptly when the 7.7 structure lands. |
Checks daily if reference/7.7/ exists upstream. When found, moves our New-Guid UUID v7 changes from reference/7.6/ to reference/7.7/ and reverts 7.6. Related: MicrosoftDocs#12888
Update New-Guid reference for PowerShell 7.6 to reflect the behavioral change from UUID v4 to UUID v7 (RFC 9562), per Cmdlets Working Group decision in PowerShell/PowerShell#24895. Changes: - DESCRIPTION: UUID v4 → v7 language, version callout note - Example 1: Remove "random" wording - Example 5 (new): .NET API usage (CreateVersion7/NewGuid) - NOTES: RFC 9562 reference, migration guidance - What's New: Breaking change + cmdlet improvement entries Addresses MicrosoftDocs#12884
f698527 to
1f5765d
Compare
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
Learn Build status updates of commit 1f5765d: ✅ Validation status: passed
For more details, please refer to the build report. |
Documents the
New-Guidbehavioral change from UUID v4 → v7, per the Cmdlets Working Group decision in PowerShell/PowerShell#24895.Warning
Breaking change:
New-Guiddefault output changes from UUID v4 (random) to UUID v7 (time-sortable). Target version updated to 7.7 per reviewer feedback — currently in draft until thereference/7.7/folder is created upstream.flowchart LR A["<b>New-Guid</b>"] -->|"7.5 and earlier"| B["UUID v4<br/><i>fully random</i>"] A -->|"7.7+"| C["UUID v7<br/><i>timestamp + random</i>"] C --> D["✓ Sortable"] C --> E["✓ Same string format"] style A fill:#4472C4,color:#fff style B fill:#E7E6E6,color:#333 style C fill:#548235,color:#fff style D fill:#E2EFDA,color:#333 style E fill:#E2EFDA,color:#333What changed in the docs
New-Guid.md[!NOTE]calloutNew-Guid.mdNew-Guid.md.NETAPI example withCreateVersion7()/NewGuid()New-Guid.mdWhat-s-New-in-PowerShell-7x.mdWhat-s-New-in-PowerShell-7x.mdDiff: DESCRIPTION before → after
Diff: NOTES before → after
New Example 5: .NET API usage
Per the docs team request, added an example showing
.NETAPIs for explicit UUID version selection with sample output highlighting the version nibble:Version targeting
Important
Per @sdwheeler's feedback, this breaking change will ship in 7.7 (not 7.6 LTS). This PR is in draft until the
reference/7.7/folder is created upstream, at which point the branch will be automatically retargeted.How the automatic retarget works
A GitHub Actions workflow on the fork runs daily:
reference/7.7/Microsoft.PowerShell.Utility/exists upstreammain, applies our diff to the 7.7 base, and force-pushes the branchreference/7.6/files are reverted to upstream state automaticallyThe workflow was locally tested against the real files —
diff → patchflow, Python script, and all edge cases verified underset -euo pipefail.Scope
New-Guid.md) and the corresponding What's New fileNew-Guidincidentally (about_Classes_Properties,about_Module_Manifests, hosting samples) — no change needed, the GUID format is identicalRelated
PR Checklist