winget-install

2.1.0

The Install-winget function automates the process of installing the winget package manager. It downloads the latest version of winget and its required dependencies from the source. After downloading, the function installs winget and updates the PATH environment variable to include directories necessary for winget's operation.

  This function is designed to be straig
The Install-winget function automates the process of installing the winget package manager. It downloads the latest version of winget and its required dependencies from the source. After downloading, the function installs winget and updates the PATH environment variable to include directories necessary for winget's operation.

  This function is designed to be straightforward and easy to use, removing the hassle of manually downloading, installing, and configuring winget. To make the newly installed winget available for use, a system reboot may be required after the execution of this function. This function should be run with administrative privileges.
Show more

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Script -Name winget-install -RequiredVersion 2.1.0

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Package Details

Author(s)

  • asheroto 1ckov MisterZeus ChrisTitusTech

Tags

PowerShell Windows winget win get install installer fix script setup

Functions

Get-GitHubRelease Write-Section Get-NewestLink Update-PathEnvironmentVariable Handle-Error

Dependencies

This script has no dependencies.

Release Notes

[Version 0.0.1] - Initial Release.
[Version 0.0.2] - Implemented function to get the latest version of winget and its license.
[Version 0.0.3] - Signed file for PSGallery.
[Version 0.0.4] - Changed URI to grab latest release instead of releases and preleases.
[Version 0.0.5] - Updated version number of dependencies.
[Version 1.0.0] - Major refactor code, see release notes for more information.
[Version 1.0.1] - Fixed minor bug where version 2.8 was hardcoded in URL.
[Version 1.0.2] - Hardcoded UI Xaml version 2.8.4 as a failsafe in case the API fails. Added CheckForUpdates, Version, Help functions. Various bug fixes.
[Version 1.0.3] - Added error message to catch block. Fixed bug where appx package was not being installed.
[Version 1.0.4] - MisterZeus optimized code for readability.
[Version 2.0.0] - Major refactor. Reverted to UI.Xaml 2.7.3 for stability. Adjusted script to fix install issues due to winget changes (thank you ChrisTitusTech). Added in all architecture support.
[Version 2.0.1] - Renamed repo and URL references from winget-installer to winget-install. Added extra space after the last line of output.
[Version 2.0.2] - Adjusted CheckForUpdates to include Install-Script instructions and extra spacing.
[Version 2.1.0] - Added alternate method/URL for dependencies in case the main URL is down. Fixed licensing issue when winget is installed on Server 2022.

FileList

Version History

Version Downloads Last updated
4.0.5 3,105 4/29/2024
4.0.4 29,741 3/6/2024
4.0.3 1,751 2/29/2024
4.0.2 5,207 2/15/2024
4.0.1 12,057 1/30/2024
4.0.0 56 1/30/2024
3.2.6 119,372 1/4/2024
3.2.5 124,090 12/15/2023
3.2.4 301,287 11/6/2023
3.2.3 120,578 10/29/2023
3.2.2 14,613 10/23/2023
3.2.1 9 10/23/2023
3.2.0 11 10/23/2023
3.1.1 10,469 10/16/2023
3.1.0 9 10/16/2023
3.0.2 56 10/16/2023
3.0.1 8,047 9/25/2023
3.0.0 15,789 8/23/2023
2.1.0 (current version) 3,440 8/17/2023
2.0.2 5,410 8/1/2023
2.0.1 16 8/1/2023
2.0.0 18 8/1/2023
1.0.4 17,439 6/28/2023
1.0.3 4,076 6/20/2023
1.0.2 104 6/20/2023
1.0.1 1,309 6/17/2023
1.0.0 25 6/17/2023
0.0.4 73,404 7/2/2022
0.0.3 27 7/1/2022
0.0.2 23 7/1/2022
Show less