Skip to content

Get-Winget is an automation tool for installing and managing Windows Package Manager (Winget). Developed by Axlfc, this repository contains scripts that facilitate the configuration, update and management of software in Windows environments, integrating seamlessly into deployment pipelines and IT workflows.

Notifications You must be signed in to change notification settings

Axlfc/get-winget

Folders and files

NameName
Last commit message
Last commit date
Feb 28, 2025
Dec 14, 2022
Aug 8, 2022
Aug 8, 2022
Mar 10, 2023
Aug 8, 2022
Aug 8, 2022
Apr 13, 2023
Feb 17, 2023
Aug 8, 2022
Aug 8, 2022
Sep 21, 2024
Aug 8, 2022

Repository files navigation

get-winget

Windows shell & powershell script to install version v1.0.11692 of winget, Window's default package manager, directly from the Windows shell itself.

Install procedure:

Install App Installer from Microsoft Store. You may need to run the cmd or Powershell: with administrative privileges. MINGW and MSYS2 might be run as administrator also.

  • Knowing actual Windows Execution Policy:

Get-ExecutionPolicy

  • To get all the execution directives that affect the current session and display them in order of precedence:

Get-ExecutionPolicy -List

  • To see the actual scope of the Execution Policy for the current user using the windows machine:

Get-ExecutionPolicy -Scope CurrentUser

  • Enable Execution of scripts (be careful to know your previous Policy of execution and to launch shell with administrator privileges, consider changing it back to the same Execution Policy as the previous one after installing winget via this script to prevent possible malware vulnerabilities associated with the Execution Policy. You should be knowing what are you doing... )

Set-ExecutionPolicy RemoteSigned

  • Navigate to the same folder via cmd or powershell (example):

cd c:\Users\USERNAME\Documents\Scripts\get-winget

  • Download the script, check for recent stable versions of releases of winget github inside the script variable to hold the url of winget's intaller from its github.

  • Execute install-winget script to begin the installation of winget on the computer if the Execution Policies have been correctly set.

Invoke-WebRequest https://github.com/Axlfc/get-winget/blob/main/install-winget.ps1 -OutFile install-winget.ps1

.\install-winget.ps1

  • Reconsider changing back to the previous Execution Policy you had before the changes made (if there are any) in the previous steps. (optional but recommended)

Set-ExecutionPolicy Default

  • Remove get-winget folder and .ps1 script and winget-installer.msixbundle file.



  • Now you should be able to install applications via command using winget, Windows' package manager.

Examples:

winget --version

winget show

Running this in cmd/powershell will install MINGW, MSYS2, the app you desire and it's in the list shown previously in your Windows computer.

winget install git

winget install MSYS2



To clone this repository into your desired folder (You can use MINGW or MSYS2 with git installed to do this. Beware spaces in folder/file names...) optional

Inside MINGW or MINGW from MYSYS2 bash console you can:

cd ~/Documents/Scripts

git clone https://github.com/Axlfc/get-winget

TODO: get winget add_to_terminal_profile

About

Get-Winget is an automation tool for installing and managing Windows Package Manager (Winget). Developed by Axlfc, this repository contains scripts that facilitate the configuration, update and management of software in Windows environments, integrating seamlessly into deployment pipelines and IT workflows.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published