microsoft / microsoft/winget-pkgs

[Package Issue]: Microsoft.PowerShell fails to install in machine scope starting with 7.5.5

Open
#367,912 2 comments 0 reactions 0 assignees View on GitHub
Issue-Bug
Dominant language
No language data
Stars
11.1k
Forks
9.7k
PR merge metrics
PR metrics pending

Description

### Please confirm these before moving forward

- [x] I have searched for my issue and not found a work-in-progress/duplicate/resolved issue.
- [x] I have not been informed if the issue is resolved in a preview version of the winget client.

### Category of the issue

Installation issue.

### Brief description of your issue

I cannot install any PowerShell version greater than 7.5.4 in machine scope.

Trying to install version 7.5.5 (or later) shows `The current system configuration does not support the installation of this package.`:
```
PS C:\windows\system32> winget install -s winget --scope machine -e --id Microsoft.PowerShell --version=7.5.5.0 --silent --force
Found PowerShell [Microsoft.PowerShell] Version 7.5.5.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Successfully verified installer hash
The current system configuration does not support the installation of this package.
PS C:\windows\system32>
```

Installing version 7.5.4 works fine:
```
PS C:\windows\system32> winget install -s winget --scope machine -e --id Microsoft.PowerShell --version=7.5.4.0 --silent --force
Found PowerShell [Microsoft.PowerShell] Version 7.5.4.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://github.com/PowerShell/PowerShell/releases/download/v7.5.4/PowerShell-7.5.4-win-x64.msi
██████████████████████████████ 107 MB / 107 MB
Successfully verified installer hash
Starting package install...
Successfully installed
PS C:\windows\system32>
```

### Steps to reproduce

Try to install the latest version of `Microsoft.PowerShell` with `--scope machine`

### Actual behavior

It cannot be installed.

### Expected behavior

It should be installed.

### Environment

```raw
Windows Package Manager v1.9.25200
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.26200.8246
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.24.25200.0

Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Portable Links Directory (User) %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User) %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root C:\Program Files\WinGet\Packages
Portable Package Root (x86) C:\Program Files (x86)\WinGet\Packages
Installer Downloads %USERPROFILE%\Downloads

Links
---------------------------------------------------------------------------
Privacy Statement https://aka.ms/winget-privacy
License Agreement https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting State
--------------------------------------------------
LocalManifestFiles Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride Disabled
LocalArchiveMalwareScanOverride Disabled
ProxyCommandLineOptions Disabled
DefaultProxy Disabled
```

### Screenshots and Logs

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the `Microsoft.PowerShell` installation with `winget install --scope machine`, comparing version 7.5.5 or later with the working 7.5.4 installation. Inspect the package metadata and installer behavior for the machine-scope difference; done means the affected PowerShell version installs successfully in machine scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.