PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

0.70.0 Command Not Found utility can't find winget client powershell module

Open Eastegg opened this issue 1 year ago • 3 comments

Microsoft PowerToys version

0.70.0

Installation method

Microsoft Store

Running as admin

Yes

Area(s) with issue?

Welcome / PowerToys Tour window

Steps to reproduce

It happend after I upgrade PowerToys image

✔️ Expected Behavior

I think the WinGet on my PowerShell is working fine. It should be find in the PowerToys.

❌ Actual Behavior

Now it ask me to install-module , and I can't download it. image

Other Software

No response

Eastegg avatar Jan 11 '24 07:01 Eastegg

@Eastegg , Does it work if you try to run the Install-Module -Name Microsoft.WinGet.Client with PowerShell running as Administrator? This might be some permission issue?

The module is needed as it's a way for having PowerShell commands to search winget packages.

/needinfo

jaimecbernardo avatar Jan 11 '24 16:01 jaimecbernardo

I'm having the same issue, the problem I have found is that the file WinGetCommandNotFound.psd1 does not exist in the PowerToys install directory, I can use WinGet just fine, but since that file is missing I get the error.

cyberpunk2350 avatar Jan 13 '24 16:01 cyberpunk2350

@Eastegg , Does it work if you try to run the Install-Module -Name Microsoft.WinGet.Client with PowerShell running as Administrator? This might be some permission issue?

The module is needed as it's a way for having PowerShell commands to search winget packages.

/needinfo

Sorry, I'm reply too late, and thank you for help. image image Plesae check my screenshot, I thinks it cause by the "Source Location". I can download by edge browser, can I manually fix it by put microsoft.winget.client.1.6.3133.nupkg to somewhere ?

And I can use winget in powershell 7.4.1, but looks like powertoys wasn't found it. image

Eastegg avatar Jan 29 '24 01:01 Eastegg

I'm having the same issue, the problem I have found is that the file WinGetCommandNotFound.psd1 does not exist in the PowerToys install directory, I can use WinGet just fine, but since that file is missing I get the error.

Me too ! Thank you for the info, do you fix it ?

Eastegg avatar Jan 29 '24 01:01 Eastegg

I ran this command...

PS: Install-Module -Name Microsoft.WinGet.Client -RequiredVersion 0.2.1

fixed the issue

tro-co avatar Jan 31 '24 21:01 tro-co

I ran this command...

PS: Install-Module -Name Microsoft.WinGet.Client -RequiredVersion 0.2.1

fixed the issue

Thanks for your help, but even I use "Install-Module -Name Microsoft.WinGet.Client -RequiredVersion 0.2.1" It still shows "Source Location 'https://www.powershellgallery.com/api/v2/package/Microsoft.WinGet.Client/0.2.1' is not valid."

It may have something to do with my regional network ?

Eastegg avatar Feb 01 '24 00:02 Eastegg

Thanks eveyone for helping me, I solved it with Install module form local repository.

Eastegg avatar Feb 01 '24 01:02 Eastegg