Name | Modified | Size | Downloads / Week |
---|---|---|---|
images | 2022-11-21 | ||
readme.md | 2023-02-12 | 3.9 kB | |
Totals: 2 Items | 3.9 kB | 0 |
_ _ _
__ __(_) _ __ __ _ ___ | |_ _ __ ___ ___ | |__
\ \ /\ / /| || '_ \ / _` | / _ \| __|| '_ \ / _ \ / __|| '_ \
\ V V / | || | | || (_| || __/| |_ | |_) || (_) |\__ \| | | |
\_/\_/ |_||_| |_| \__, | \___| \__|| .__/ \___/ |___/|_| |_|
|___/ |_|
Demo
A small set of functions to help using winget.
It's TUI (Terminal User Interface) entirely written in Powershell. It has one dependenciy : Microsoft.PowerShell.ConsoleGuiTools
For now, it't only tested with Windows Terminal runnning the latest (7.2.6) Powershell Core
The availablle functions are : - Show-WGList - Search-WGPackage "name (or part) of the package" [-Interactive] [-Install] - Show-WGUpdatables - Update-WGPackage - Install-WGPackage - Uninstall-WGPackage [-Interactive]
Installation
Install-Module -Name wingetposh -Scope CurrentUser
History
0.5.1 :
- Fixed the show-WGList bug when there is no updatable packages to show.
0.5.2 :
- Removed the "-Interactive" switch to search-WGPackage.
- Removed the search parameter from search-WGPackage.
- Allowing multiple selection in uninstall-WGPackage.
- Removing crash brug when no package is found in search-WGPackage.
- Removing the "-Interactive" switch to updage-WGPackage. If no Object is passed through the pipeline, it will automatically display an interactive grid
- Update readme.md
0.5.4 :
- Addind a license file.
0.5.5 :
- Adding license acceptance when installing module
0.5.6 :
- Adding headless functions : Get-WGList and Get-WGUpdatables
0.6.0 :
- Removing "Microsoft.PowerShell.ConsoleGuiTools" dependance to add Powershell 5.1 compatibility
- Rewriting the TUI in full powershell (some flickering still to fix)
- Adding "Invoke-Winget" funtion to add generic call to Winget
0.6.1 :
- Fix -Install switch of Install-WGPAckage
- Rename Show-WGUpdatables to Update-WGPackages
- Add a switch -Update to Update-WGPackages
Remark :
To install in powershell 5.1, you need to install the latest "PowershellGet"
Install-Module PowerShellGet -AllowClobber -Force
Examples
Show-WGList
This function allows multiselection. When at least one package is selected, when the function is exitted with "Return", an Object list is returned.
When Hit return .....
Of course, we can use this object collection to extract some usefull data .....
Search and install a package
The -Install parameter will launch the installation of the selected package(s).
Install-WGPackage -Install
Select and update an installed package
Update-WGPackages -update
Select and uninstall an installed package
Uninstall-WGPackage
Generic function to convert winget results to PSCustomObject
$list = Invoke-Winget "winget list"