Repository navigation
Add compatibility profiles for Windows 11 with PowerShell 5.1, 7.4, 7.5 and 7.6 #2228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. | ||
|
|
||
| Describe "Platform data collection" { | ||
| It "Reports the .NET runtime as Core on PowerShell 6 and later" -Skip:($PSVersionTable.PSVersion.Major -lt 6) { | ||
| (Get-PSCompatibilityPlatformData).Dotnet.Runtime | Should -Be 'Core' | ||
| } | ||
| } | ||
|
|
||
| Describe "Module data collection" { | ||
| It "Collects Microsoft.PowerShell.Diagnostics commands despite its type data already being loaded" -Skip:(-not $IsWindows -or $PSVersionTable.PSVersion.Major -lt 7) { | ||
| $pwsh = [powershell]::Create() | ||
| try { | ||
| $psVersion = [Microsoft.PowerShell.CrossCompatibility.PowerShellVersion]::Create($PSVersionTable.PSVersion) | ||
| $collector = [Microsoft.PowerShell.CrossCompatibility.Collection.PowerShellDataCollector+Builder]::new().Build($pwsh, $psVersion) | ||
| $module = Get-Module -ListAvailable -Name (Join-Path $PSHOME 'Modules/Microsoft.PowerShell.Diagnostics') | ||
|
|
||
| $err = $null | ||
| $moduleData = $collector.LoadAndGetModuleData($module, [ref]$err) | ||
|
|
||
| $err | Should -BeNullOrEmpty | ||
| $moduleData.Item3.Cmdlets.Keys | Should -Contain 'Get-WinEvent' | ||
| } | ||
| finally { | ||
| $pwsh.Dispose() | ||
| } | ||
| } | ||
| } |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| --- | ||
| description: Use compatible types | ||
| ms.date: 07/21/2026 | ||
| ms.date: 10/18/2026 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. those dates come from msdocs. because we need to sync with their repo 2 way, please undo this change. this date only gets changes on msdocs side and then later gets synced to us |
||
| ms.topic: reference | ||
| title: UseCompatibleTypes | ||
| --- | ||
|
|
@@ -54,6 +54,7 @@ Platforms bundled by default are: | |
| | 5.1 | Windows Server 2016 | `win-8_x64_10.0.14393.0_5.1.14393.2791_x64_4.0.30319.42000_framework` | | ||
| | 5.1 | Windows Server 2019 | `win-8_x64_10.0.17763.0_5.1.17763.316_x64_4.0.30319.42000_framework` | | ||
| | 5.1 | Windows 10 Pro | `win-48_x64_10.0.17763.0_5.1.17763.316_x64_4.0.30319.42000_framework` | | ||
| | 5.1 | Windows 11 Enterprise | `win-4_x64_10.0.26200.0_5.1.26100.9711_x64_4.0.30319.42000_framework` | | ||
| | 6.2 | Ubuntu 18.04 LTS | `ubuntu_x64_18.04_6.2.4_x64_4.0.30319.42000_core` | | ||
| | 6.2 | Windows 10.0.14393 | `win-8_x64_10.0.14393.0_6.2.4_x64_4.0.30319.42000_core` | | ||
| | 6.2 | Windows 10.0.17763 | `win-8_x64_10.0.17763.0_6.2.4_x64_4.0.30319.42000_core` | | ||
|
|
@@ -62,6 +63,9 @@ Platforms bundled by default are: | |
| | 7.0 | Windows 10.0.14393 | `win-8_x64_10.0.14393.0_7.0.0_x64_3.1.2_core` | | ||
| | 7.0 | Windows 10.0.17763 | `win-8_x64_10.0.17763.0_7.0.0_x64_3.1.2_core` | | ||
| | 7.0 | Windows 10.0.18362 | `win-4_x64_10.0.18362.0_7.0.0_x64_3.1.2_core` | | ||
| | 7.4 | Windows 11 Enterprise | `win-4_x64_10.0.26200.0_7.4.21_x64_8.0.32_core` | | ||
| | 7.5 | Windows 11 Enterprise | `win-4_x64_10.0.26200.0_7.5.12_x64_9.0.21_core` | | ||
| | 7.6 | Windows 11 Enterprise | `win-4_x64_10.0.26200.0_7.6.7_x64_10.0.13_core` | | ||
|
|
||
| Other profiles can be found in the [GitHub repo][02]. | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
those dates come from msdocs. because we need to sync with their repo 2 way, please undo this change. this date only gets changes on msdocs side and then later gets synced to us