winget
6 TopicsWingetCreate: Keeping WinGet packages up-to-date!
In the ever-evolving landscape of software development, efficiency is key. Windows users have long awaited an experience, where the simplicity of installing, updating, and managing software could be as seamless as executing a single command. Enter Windows Package Manager, or WinGet, a powerful tool that reshapes the way we handle software packages on the Windows platform. WinGet brings the simplicity of Linux package managers to the Windows environment, enabling users to use the command-line for installing their favorite packages.7.5KViews1like0CommentsApp installation with PowerShell and winget
Hello, I'm trying to install a Visual C++ Redistributable package with winget. The first problem I had was that "App Installer" wasn't installed on the devices so I installed it via the "Add-AppxPackage" command. For some Intune showed me that the script had failed but it still was installed and I could use winget. After that, I created a new script to install VC redist with winget but it failed. In logs, I found the error message and it says that the term "winget" is not recognized as the name of the cmdlet. Has someone an idea what the problem is?5.6KViews0likes3CommentsWinGet - Application management - Thoughts
Good morning Has anybody started serious work on managing their corporate devices via this solution, especially in deployment and patch management. I am unable to find an official Microsoft repository for the management of applications in GitHub which tells me Microsoft are not managing devices via WinGet and although I have found work via various MVPs on this new functionality it seems to be limited to initial deployment. Anybody doing serious work with this? In my humble unprofessional opinion (hobbyist) this functionality would solve many problems. I have noticed that Microsoft.Office aka Microsoft 365 Apps for enterprise when deployed via this method installs the x86 application on x64 hardware, which is not my preferred solution, so if anybody knows where to find the appropriate switches, I would appreciate a heads up. I have included my test code (work of another) with a few minor modifications. Its basically proactive remediation - MEM, ready but for a couple of lines. <# Reference https://www.codewrecks.com/post/general/winget-update-selective/ Notes This code is the work of Gian Maria and has been published on the above link This code has been tested to ensure it works on a upgrade case and a no upgrade case The code is missing the actual upgrade command which is winget upgrade --all --force --accept-package-agreements --accept-source-agreements The code is not proactive remediation ready, but can be with a couple of exit statements. #> class Software { [string]$Name [string]$Id [string]$Version [string]$AvailableVersion } $upgradeResult = winget upgrade | Out-String if (!($upgradeResult -match "No installed package found matching input criteria.")) { Write-Host "There is something to update" -ForegroundColor Green $lines = $upgradeResult.Split([Environment]::NewLine) # Find the line that starts with Name, it contains the header $fl = 0 while (-not $lines[$fl].StartsWith("Name")) { $fl++ } # Line $i has the header, we can find char where we find ID and Version $idStart = $lines[$fl].IndexOf("Id") $versionStart = $lines[$fl].IndexOf("Version") $availableStart = $lines[$fl].IndexOf("Available") $sourceStart = $lines[$fl].IndexOf("Source") # Now cycle in real package and split accordingly $upgradeList = @() For ($i = $fl + 1; $i -le $lines.Length; $i++) { $line = $lines[$i] if ($line.Length -gt ($availableStart + 1) -and -not $line.StartsWith('-')) { $name = $line.Substring(0, $idStart).TrimEnd() $id = $line.Substring($idStart, $versionStart - $idStart).TrimEnd() $version = $line.Substring($versionStart, $availableStart - $versionStart).TrimEnd() $available = $line.Substring($availableStart, $sourceStart - $availableStart).TrimEnd() $software = [Software]::new() $software.Name = $name; $software.Id = $id; $software.Version = $version $software.AvailableVersion = $available; $upgradeList += $software } } $upgradeList | Format-Table #Actual upgrade command - been removed as this code needs to be rewritten for proactive remediation #winget upgrade --all --force --accept-package-agreements --accept-source-agreements } else { Write-Host "There is nothing to upgrade" -ForegroundColor Yellow } Thankyou for reading and like I said, I'm a hobbyist in a test tenant but keen to learn. Sincerely.2.8KViews0likes2CommentsWinget: works from limited user but not from administrative user
When I try to upgrade apps through winget from a PowerShell prompt reached in my limited userspace but launched with administrative privileges, it returns an error: "The term 'winget' is not recognized as a name of a cmdlet, function, script file, or executable program." But when I just launch PS from that userspace, without administrative privileges, it works fine. Why? Although winget works from my limited user prompt, it requires constantly inputting an administrator passcode, which means winget cannot be used unattended.1.3KViews0likes0Comments