Change New-Guid to generate UUID v7 by default by SufficientDaikon · Pull Request #27033 · PowerShell/PowerShell
Replace `Guid.NewGuid()` with `Guid.CreateVersion7()` in the New-Guid cmdlet. UUID v7 (RFC 9562) embeds a millisecond-precision timestamp making generated GUIDs monotonically sortable, which is ideal for database primary keys and distributed systems. Users who specifically need UUID v4 can call [Guid]::NewGuid() directly. Fixes PowerShell#24895 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced
SufficientDaikon added a commit to SufficientDaikon/PowerShell-Docs that referenced this pull request
Update `New-Guid` reference page for PowerShell 7.6 to reflect the change from UUID v4 to UUID v7 (`Guid.CreateVersion7()`). Add .NET API examples per docs team request, and note the breaking change in the What's New page. Closes MicrosoftDocs#12884 Related: PowerShell/PowerShell#27033
kilasuit
added
CL-General
labels
Copilot AI review requested due to automatic review settings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters