Re:Jeffrey Snover and the Making of PowerShell
by g15jv2dp on Thursday July 04, 2024 @12:54PM
(#40876346)
If you have winget and powershell installed, try `Get-WingetPackage` and see what comes out. Or even better:
The "usual" winget cli tool is indeed not powershell compatible. But winget also ships with all the necessary cmdlets. You don't have to install anything extra.
[ Parent
| on HN ]
Re:Jeffrey Snover and the Making of PowerShell
by gecko on Thursday July 04, 2024 @02:30PM
(#40877025)
I was super excited to see this comment, but I don't seem to have those cmdlets, even though I'm on Windows 11, fully updated. Are you sure you didn't install something extra?
Re:Jeffrey Snover and the Making of PowerShell
by easton on Thursday July 04, 2024 @03:21PM
(#40877340)
If I recall correctly, they only work in PowerShell 7. If you don’t even have them in there, you can install them from https://github.com/microsoft/winget-cli (which is bad UX, but if you just need them on one system it’s a way to do it).
Re:Jeffrey Snover and the Making of PowerShell
by gecko on Thursday July 04, 2024 @03:33PM
(#40877434)
I'm in PowerShell 7.4.2 and they're definitely absent. I hadn't thought to install directly from GitHub, given part of the whole shtick of winget is it's The One True Package Manager and bundled, but I can't say I'm surprised, either...
Re:Jeffrey Snover and the Making of PowerShell
by Uvix on Thursday July 04, 2024 @04:22PM
(#40877764)
Probably better off installing from PowerShell Gallery instead. https://www.powershellgallery.com/packages/Microsoft.WinGet....
Re:Jeffrey Snover and the Making of PowerShell
by g15jv2dp on Friday July 05, 2024 @01:34AM
(#40880067)
I don't remember. Maybe I did install the modules. https://www.powershellgallery.com/packages/Microsoft.WinGet....
Install-Module -Name Microsoft.WinGet.Client
Re:Jeffrey Snover and the Making of PowerShell
by feldrim on Friday July 05, 2024 @06:24AM
(#40881563)
The Winget module is a wreck. The way it is designed, unfortunately, neither fits the object oriented approach of PowerShell nor follows the PowerShell guidelines for cmdlets.
For instance https://github.com/microsoft/winget-cli/issues/3820 or https://github.com/microsoft/winget-cli/issues/3231.
Also, even though it does not completely work with PowerShell 5, it is marked as compatible. https://github.com/microsoft/winget-cli/issues/2881
The design choices made makes it weird. I hope it would be a good one in the future. But it is now problematic.