It’s built into the latest builds of Windows 10 and 11 and Server, and can be installed into many. One good way to try it, is to install Microsoft .NET framework (SDK) 6, thus, from administrative Powershell:
winget install --id Microsoft.DotNet.Runtime.6 --silent --accept-source-agreements
I learned just now that if you add other seemingly valuable options to the one above, e.g., --scope machine
, at least while running as SYSTEM, it will fail citing package not found. So you’ll want to test carefully.
Here’s one proven just now for 7zip (there’s a “search” option in winget to get the ID):
winget install --exact --id 7zip.7zip --accept-package-agreements --silent --scope machine
Here’s one for Google Chrome, needs a bit of extra:
winget.exe install --exact --id Google.Chrome --silent --accept-package-agreements --accept-source-agreements --scope machine
If you do want to use it from the SYSTEM account, in scripting, it gets interesting. You’ll want to first run this:
$ResolveWingetPath = Resolve-Path "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe" if ($ResolveWingetPath){ $WingetPath = $ResolveWingetPath[-1].Path } $ENV:PATH += ";$WingetPath"
and then winget will run as expected.
If your system is Windows 10/2016/2019 build 1809 or higher, we can add winget if it’s not already there. Go to the Microsoft Store, and search for “App Installer” by Microsoft. Attempts to script this can be found, but none have worked persistently yet.