Skip to content

HOW TO FIX WINGET ERROR IN POWERSHELL #5409

@jcoy101

Description

@jcoy101

Brief description of your issue

Winget not recognised in powershell/cmd

Steps to reproduce

How 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 behavior

For It To Work

Actual behavior

It didnt work till i found the solution

Environment

winget in powershell

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions