HOW TO FIX WINGET ERROR IN POWERSHELL #5411
-
Brief description of your issueWinget not recognised in powershell/cmd Steps to reproduceHow to solve: Check your current execution policy: powershell Type Get-ExecutionPolicy Then Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass Then .\winget-install.ps1 -Force You will probably get an error, trust me! Next step Install-Script -Name winget-install -Force This will install it in C:\ powershell directory Then Since you already bypassed the execution policy for this session, now just run: & "C:\Program Files\WindowsPowerShell\Scripts\winget-install.ps1" -Force This Worked For Me Guys LakesideTech102 Expected behaviorFor It To Work Actual behaviorIt didnt work till i found the solution Environmentwinget in powershell |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It seems like you're trying to install winget through a custom script, which may not be a supported method. Have you tried downloading the latest msixbundle from https://aka.ms/getwinget and running the msixbundle file? Alternatively, you can use Repair-WinGetPackageManager powershell cmdlet to get the latest WinGet via the sandbox script. See Install WinGet on Windows Sandbox for the script contents. |
Beta Was this translation helpful? Give feedback.
It seems like you're trying to install winget through a custom script, which may not be a supported method. Have you tried downloading the latest msixbundle from https://aka.ms/getwinget and running the msixbundle file? Alternatively, you can use Repair-WinGetPackageManager powershell cmdlet to get the latest WinGet via the sandbox script. See Install WinGet on Windows Sandbox for the script contents.