Chocolatey CLI reports wrong OS name in `chocolatey.log` file when using Windows Server 2025
- Dominant language
- C#
- Stars
- 11.5k
- Forks
- 960
- PR merge metrics
- No merged PRs in 30d
Description
### Checklist
- [x] I confirm there are no unresolved issues reported on the [Chocolatey Status page](https://status.chocolatey.org).
- [x] I have verified this is the correct repository for opening this issue.
- [x] I have verified no other issues exist related to my problem.
- [x] I have verified this is not an issue for a specific package.
- [x] I have verified this issue is not security related.
- [x] I confirm I am using **official**, and **not** unofficial, or modified, Chocolatey products.
### What You Are Seeing?
When using Chocolatey CLI on Windows Server 2025, the PlatformName in the chocolatey.log file is coming back as 'Windows Server 2022'
### What is Expected?
The correct Platform Name for the operating system should be displayed
### How Did You Get This To Happen?
1. Install Chocolatey CLI on Windows Server 2025
2. Run a choco command
3. Inspect log, and observe the Information.ProductName entry
### System Details
* Operating System: Windows Server 2025
* Windows PowerShell version: 7.5.4
* Chocolatey CLI Version: 2.5.1
* Chocolatey Licensed Extension version: 6.3.1
* Chocolatey License type: Business
* Terminal/Emulator: Windows Terminal
### Installed Packages
```bash
N/A
```
### Output Log
```bash
2025-10-27 08:41:10,421 2832 [DEBUG] - Configuration: CommandName='install'|
CacheLocation='C:\Users\Administrator\AppData\Local\Temp\chocolatey'|
CommandExecutionTimeoutSeconds='2700'|WebRequestTimeoutSeconds='30'|
Sources='https://licensedpackages.chocolatey.org/api/v2/'|
ExplicitSources='https://licensedpackages.chocolatey.org/api/v2/'|
SourceType='normal'|IncludeConfiguredSources='False'|
ShowOnlineHelp='False'|Debug='False'|Verbose='False'|Trace='False'|
Force='False'|Noop='False'|HelpRequested='False'|
UnsuccessfulParsing='False'|RegularOutput='False'|QuietOutput='False'|
PromptForConfirmation='False'|DisableCompatibilityChecks='False'|
AcceptLicense='True'|AllowUnofficialBuild='False'|
Input='chocolatey.extension'|AllVersions='False'|
SkipPackageInstallProvider='False'|SkipHookScripts='False'|
PackageNames='chocolatey.extension'|Prerelease='False'|
ForceX86='False'|
OverrideArguments='False'|NotSilent='False'|
PackageParameters='/NoContextMenu'|
ApplyPackageParametersToDependencies='False'|
ApplyInstallArgumentsToDependencies='False'|IgnoreDependencies='False'|
UseHttpCache='True'|CacheExpirationInMinutes='30'|
AllowDowngrade='False'|ForceDependencies='False'|PinPackage='False'|
IncludeHeaders='False'|Information.PlatformType='Windows'|
Information.PlatformVersion='10.0.26100.0'|
Information.PlatformName='Windows Server 2022'|
Information.ChocolateyVersion='2.5.1.0'|
Information.ChocolateyProductVersion='2.5.1'|
Information.FullName='choco, Version=2.5.1.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb'|
```
### Additional Context
N/A
┆Issue is synchronized with this [Clickup task](https://app.clickup.com/t/868j27208) by [Unito](https://www.unito.io)
Contributor guide
Research direction
Reproduce the issue on Windows Server 2025 by running a choco command and inspecting chocolatey.log for the Information.PlatformName entry. Trace the code responsible for identifying and logging the platform name, then verify that the log reports Windows Server 2025 rather than Windows Server 2022.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100