This article is still being finished.
The Windows par is done, the server still needs work
This article covers a couple of useful commands for users or IT administrators to keep a range of applications updated.
WinGet is a command-line tool that lets users discover, install, upgrade, remove, and configure applications on Windows 10, Windows 11, and Windows Server computers. This tool is the client interface to the Windows Package Manager service. Many applications by Microsoft and third-party vendors use Winget to download, uninstall, or upgrade.
I'm going to try to cover:
- Its use with Windows 11 or Windows 10 version 1809 (build 17763) or later
- How to set it up on Windows Server 2022 (should also work on Server 2019)
- How to automate the updates via Intune or Group Policy
Running Winget Upgrade
Start PowerShell as an Administrator using one of these methods:
When running WinGet without administrator privileges, some applications may require elevation to install. When the installer runs, Windows will prompt you to elevate. If you choose not to elevate, the application will fail to install.
- Start Menu Search: Press the Windows Key, type powershell, and click Run as administrator in the right-hand panel.
- Power User Menu: Press Windows + X and select Terminal (Admin) or Windows PowerShell (Admin).
- Run Dialog: Press Windows + R, type powershell, and press Ctrl + Shift + Enter
The simplest method is to type this and press Enter:
winget upgrade --all --include-unknownAnother useful command is to list all apps Winget can see:
winget listInstalling on Windows Server 2019/2022
The Server operating systems lack the Microsoft Store by default, they also lack the background infrastructure to manage modern app dependencies.
Usually, the simplest method is from an elevated PowerShell prompt, running these commands:
cd \tempInstall-Script -Name winget-install -Forcewinget-install -ForceWhen finished, open a new PowerShell windows and confirm the install with:
winget --infoIf that method doesn't work due to script blocks or dependencies not being available, use this manual method:
- Prepare PowerShell for secure web communications. Open an elevated PowerShell window and run these commands:
# Force PowerShell to use TLS 1.2 for secure web connections
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12# Temporarily bypass script execution restrictions
Set-ExecutionPolicy Bypass -Scope Process -Force# Create and navigate to a working directory
New-Item -ItemType Directory -Force -Path "C:\winget-init"Set-Location "C:\winget-init"For more info on Winget Upgrade, see:
https://learn.microsoft.com/en-us/windows/package-manager/winget/upgrade
No comments:
Post a Comment