{"id":1040,"date":"2026-11-06T03:17:28","date_gmt":"2026-11-06T03:17:28","guid":{"rendered":"https:\/\/windows-vps.org\/blog\/?p=1040"},"modified":"2026-11-06T03:17:28","modified_gmt":"2026-11-06T03:17:28","slug":"winget-chocolatey-silent-upgrades-windows-server","status":"publish","type":"post","link":"https:\/\/windows-vps.org\/blog\/winget-chocolatey-silent-upgrades-windows-server\/","title":{"rendered":"Winget and Chocolatey for Silent Upgrades on Windows Server: A Working Setup"},"content":{"rendered":"<div style=\"padding:20px\">\n<p>Windows Server has no equivalent of a Linux distribution&#8217;s unattended-upgrade daemon, and Windows Update covers only Microsoft&#8217;s own patches. For third-party software \u2014 Git, 7-Zip, Python, Node, SQL Server tooling \u2014 you need a package manager, and the two realistic choices on Server 2019, 2022 and 2025 are winget and Chocolatey.<\/p>\n<p>Both can run unattended on a schedule, both have sharp edges when run under a service account, and both will silently do the wrong thing if you point them at the wrong scope. This is a working setup rather than an overview: what to install, how to pin, how to log, and where each tool breaks.<\/p>\n<h2>Which tool for which job<\/h2>\n<p>Winget is Microsoft&#8217;s package manager, shipped with modern Windows and available as an MSIX bundle on Server 2019 onward. It resolves packages from the winget community repository, which mirrors vendor installers. Its strength is that it uses the vendor&#8217;s own installer, so licensing and signatures are exactly what the vendor intended. Its weakness is that many vendors ship interactive MSIs, and winget&#8217;s silent switches may not suppress every UI prompt.<\/p>\n<p>Chocolatey wraps installs in PowerShell scripts and has a much longer history on servers. It handles silent flags per package, has a large maintained repository, and its business edition adds package internalisation \u2014 downloading the installer once, then installing from a local cache, which matters if your VPS has flaky outbound access. The community edition is free and adequate for a small fleet.<\/p>\n<table>\n<tr>\n<th>Aspect<\/th>\n<th>Winget<\/th>\n<th>Chocolatey<\/th>\n<\/tr>\n<tr>\n<td>Install source<\/td>\n<td>Vendor installer via manifest<\/td>\n<td>PowerShell script wrapping installer<\/td>\n<\/tr>\n<tr>\n<td>Machine scope<\/td>\n<td>Yes, with admin context<\/td>\n<td>Yes, default for admin<\/td>\n<\/tr>\n<tr>\n<td>Pinning versions<\/td>\n<td>Yes, per package<\/td>\n<td>Yes, via <code>--version<\/code><\/td>\n<\/tr>\n<tr>\n<td>Offline cache<\/td>\n<td>Limited<\/td>\n<td>Business edition internalise<\/td>\n<\/tr>\n<tr>\n<td>Server support<\/td>\n<td>2019+, best on 2022\/2025<\/td>\n<td>2012+<\/td>\n<\/tr>\n<\/table>\n<h2>Installing both without breaking each other<\/h2>\n<p>Install winget first. On Server 2025 it is present; on 2019 and 2022 you add it via the App Installer MSIX bundle, which requires the Desktop Experience \u2014 winget does not run on Server Core. Chocolatey installs from a one-line PowerShell bootstrap and places its binaries in <code>C:\\ProgramData\\chocolatey\\bin<\/code>, which is already on the machine PATH.<\/p>\n<pre># AllUsers scope, non-interactive\n$env:ChocolateyInstall = 'C:\\ProgramData\\chocolatey'\nSet-ExecutionPolicy Bypass -Scope Process -Force\n[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\niex ((New-Object Net.WebClient).DownloadString('https:\/\/community.chocolatey.org\/install.ps1'))\n\nchoco --version\nwinget --version<\/pre>\n<p>Keep the two package sets disjoint. Installing the same application through both managers leads to a state where each thinks it owns the install and upgrades fight over the same files. Pick one manager per application and record the choice in a short table in your runbook.<\/p>\n<h2>Unattended upgrade patterns that actually work<\/h2>\n<p>Winget&#8217;s upgrade verb is the simplest option and covers everything installed through it:<\/p>\n<pre>winget upgrade --all --silent --accept-package-agreements --accept-source-agreements --disable-interactivity<\/pre>\n<p>Chocolatey&#8217;s equivalent upgrades only packages it manages, and needs <code>-y<\/code> to avoid prompts:<\/p>\n<pre>choco upgrade all -y --no-progress --limit-output --execution-timeout=2700<\/pre>\n<p>Run both from a scheduled task as SYSTEM, not as your interactive user, so the machine-scope registry and Program Files are writable and the job does not depend on anyone being logged in. Log to a file with timestamps, because &#8220;the upgrade ran&#8221; and &#8220;the upgrade succeeded&#8221; are different claims.<\/p>\n<h2>Pinning, exclusions and rollback<\/h2>\n<p>Blindly upgrading everything is how a working box breaks at 2 a.m. Pin anything whose major version you have not tested:<\/p>\n<ul>\n<li>Winget: <code>winget pin add --id Git.Git --version 2.45.2<\/code>, then <code>winget pin list<\/code> to audit.<\/li>\n<li>Chocolatey: install with an explicit <code>--version<\/code>, then add <code>--pin<\/code> so <code>upgrade all<\/code> skips it.<\/li>\n<li>Exclude packages that need a reboot mid-upgrade from the same run as those that do not.<\/li>\n<\/ul>\n<p>Rollback is the weak spot in both tools. Winget has no downgrade verb; you reinstall the pinned older version explicitly. Chocolatey can install an older version but will not restore prior configuration. The practical answer is to snapshot the VM before a bulk upgrade window, or to keep the installer binaries in a local folder so you can reinstall a known-good build without relying on the repository still hosting it.<\/p>\n<h2>Running under a service account and logging<\/h2>\n<p>A dedicated gMSA or a local service account with &#8220;Log on as a service&#8221; is the right identity. SYSTEM works but has unrestricted local admin, which is more than a package manager needs. If you use a proxy, both tools need it configured separately \u2014 winget honours the WinHTTP proxy, Chocolatey uses <code>choco config set proxy<\/code>.<\/p>\n<pre>New-Item -ItemType Directory -Force C:\\logs\\pkg\n$log = \"C:\\logs\\pkg\\upgrade-$(Get-Date -f yyyyMMdd-HHmm).log\"\nStart-Transcript -Path $log\nwinget upgrade --all --silent --accept-package-agreements --accept-source-agreements --disable-interactivity\nchoco upgrade all -y --no-progress\nStop-Transcript\nGet-Content $log | Select-String -Pattern 'error|failed|exit code'<\/pre>\n<p>Parse the transcript for failures rather than relying on exit codes alone: both tools return 0 in cases where an individual package failed. Alert on the string match, and keep 30 days of logs on a separate volume so a disk-full condition does not erase the evidence.<\/p>\n<h2>The traps worth knowing before you schedule anything<\/h2>\n<p><strong>Interactive MSIs.<\/strong> Some vendor installers ignore silent flags and wait for a click. Set <code>--execution-timeout<\/code> in Chocolatey and a task-level timeout in the scheduler so a hung installer does not block the queue.<\/p>\n<p><strong>Per-user versus machine scope.<\/strong> A package installed in your RDP session&#8217;s user context lands in <code>%LOCALAPPDATA%<\/code> and is invisible to a SYSTEM-scope upgrade. Always install with admin elevation and machine scope; verify with <code>winget list --scope machine<\/code>.<\/p>\n<p><strong>Proxy and TLS.<\/strong> A proxy that inspects TLS can break manifest signature checks. Whitelist the repository endpoints rather than disabling validation.<\/p>\n<p><strong>Reboots.<\/strong> Neither tool reboots for you reliably. Detect pending reboot with the registry keys under <code>Component Based Servicing<\/code> and schedule the restart yourself inside a maintenance window. For the wider patching picture on a rented box, see our notes on <a href=\"https:\/\/windows-vps.org\/\">Windows Server patch management on a VPS<\/a>; if you are still choosing a host, the <a href=\"https:\/\/windows-vps.org\/\">Windows VPS buyer&#8217;s checklist<\/a> covers image and snapshot behaviour, which is what makes rollback practical.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Windows Server has no equivalent of a Linux distribution&#8217;s unattended-upgrade daemon, and Windows Update covers only Microsoft&#8217;s own patches. For third-party software \u2014 Git, 7-Zip, Python, Node, SQL Server tooling \u2014 you need a package manager, and the two realistic choices on Server 2019, 2022 and 2025 are winget and Chocolatey. Both can run unattended &#8230; <a title=\"Winget and Chocolatey for Silent Upgrades on Windows Server: A Working Setup\" class=\"read-more\" href=\"https:\/\/windows-vps.org\/blog\/winget-chocolatey-silent-upgrades-windows-server\/\" aria-label=\"Read more about Winget and Chocolatey for Silent Upgrades on Windows Server: A Working Setup\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":0,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-1040","post","type-post","status-publish","format-standard","hentry","category-tutorials-guides"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.1 (Yoast SEO v26.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Winget and Chocolatey for Silent Upgrades on Windows Server: A Working Setup - Windows VPS Blog<\/title>\n<meta name=\"description\" content=\"Windows Server has no equivalent of a Linux distribution&#039;s unattended-upgrade daemon, and Windows Update covers only Microsoft&#039;s own patches. For\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/windows-vps.org\/blog\/winget-chocolatey-silent-upgrades-windows-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Winget and Chocolatey for Silent Upgrades on Windows Server: A Working Setup\" \/>\n<meta property=\"og:description\" content=\"Winget and Chocolatey for Silent Upgrades on Windows Server: A Working Setup\" \/>\n<meta property=\"og:url\" content=\"https:\/\/windows-vps.org\/blog\/winget-chocolatey-silent-upgrades-windows-server\/\" \/>\n<meta property=\"og:site_name\" content=\"Windows VPS Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-06T03:17:28+00:00\" \/>\n<meta name=\"author\" content=\"windows-vps\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@myxiechengxuan\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"windows-vps\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/windows-vps.org\/blog\/winget-chocolatey-silent-upgrades-windows-server\/\",\"url\":\"https:\/\/windows-vps.org\/blog\/winget-chocolatey-silent-upgrades-windows-server\/\",\"name\":\"Winget and Chocolatey for Silent Upgrades on Windows Server: A Working Setup - Windows VPS Blog\",\"isPartOf\":{\"@id\":\"https:\/\/windows-vps.org\/blog\/#website\"},\"datePublished\":\"2026-11-06T03:17:28+00:00\",\"author\":{\"@id\":\"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/44caceed916d0db318aa08d5623a7a58\"},\"description\":\"Windows Server has no equivalent of a Linux distribution's unattended-upgrade daemon, and Windows Update covers only Microsoft's own patches. For\",\"breadcrumb\":{\"@id\":\"https:\/\/windows-vps.org\/blog\/winget-chocolatey-silent-upgrades-windows-server\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/windows-vps.org\/blog\/winget-chocolatey-silent-upgrades-windows-server\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/windows-vps.org\/blog\/winget-chocolatey-silent-upgrades-windows-server\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/windows-vps.org\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Winget and Chocolatey for Silent Upgrades on Windows Server: A Working Setup\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/windows-vps.org\/blog\/#website\",\"url\":\"https:\/\/windows-vps.org\/blog\/\",\"name\":\"Windows VPS Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/windows-vps.org\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/44caceed916d0db318aa08d5623a7a58\",\"name\":\"windows-vps\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3f2573db5afcd1a6ab9abcc5d48fc8e42584bc87ab9d98cc156e5b2097766dd9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3f2573db5afcd1a6ab9abcc5d48fc8e42584bc87ab9d98cc156e5b2097766dd9?s=96&d=mm&r=g\",\"caption\":\"windows-vps\"},\"sameAs\":[\"https:\/\/windows-vps.org\/blog\",\"https:\/\/x.com\/myxiechengxuan\"],\"url\":\"https:\/\/windows-vps.org\/blog\/author\/myxiechengxuan\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Winget and Chocolatey for Silent Upgrades on Windows Server: A Working Setup - Windows VPS Blog","description":"Windows Server has no equivalent of a Linux distribution's unattended-upgrade daemon, and Windows Update covers only Microsoft's own patches. For","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/windows-vps.org\/blog\/winget-chocolatey-silent-upgrades-windows-server\/","og_locale":"en_US","og_type":"article","og_title":"Winget and Chocolatey for Silent Upgrades on Windows Server: A Working Setup","og_description":"Winget and Chocolatey for Silent Upgrades on Windows Server: A Working Setup","og_url":"https:\/\/windows-vps.org\/blog\/winget-chocolatey-silent-upgrades-windows-server\/","og_site_name":"Windows VPS Blog","article_published_time":"2026-11-06T03:17:28+00:00","author":"windows-vps","twitter_card":"summary_large_image","twitter_creator":"@myxiechengxuan","twitter_misc":{"Written by":"windows-vps","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/windows-vps.org\/blog\/winget-chocolatey-silent-upgrades-windows-server\/","url":"https:\/\/windows-vps.org\/blog\/winget-chocolatey-silent-upgrades-windows-server\/","name":"Winget and Chocolatey for Silent Upgrades on Windows Server: A Working Setup - Windows VPS Blog","isPartOf":{"@id":"https:\/\/windows-vps.org\/blog\/#website"},"datePublished":"2026-11-06T03:17:28+00:00","author":{"@id":"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/44caceed916d0db318aa08d5623a7a58"},"description":"Windows Server has no equivalent of a Linux distribution's unattended-upgrade daemon, and Windows Update covers only Microsoft's own patches. For","breadcrumb":{"@id":"https:\/\/windows-vps.org\/blog\/winget-chocolatey-silent-upgrades-windows-server\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/windows-vps.org\/blog\/winget-chocolatey-silent-upgrades-windows-server\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/windows-vps.org\/blog\/winget-chocolatey-silent-upgrades-windows-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/windows-vps.org\/blog\/"},{"@type":"ListItem","position":2,"name":"Winget and Chocolatey for Silent Upgrades on Windows Server: A Working Setup"}]},{"@type":"WebSite","@id":"https:\/\/windows-vps.org\/blog\/#website","url":"https:\/\/windows-vps.org\/blog\/","name":"Windows VPS Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/windows-vps.org\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/44caceed916d0db318aa08d5623a7a58","name":"windows-vps","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3f2573db5afcd1a6ab9abcc5d48fc8e42584bc87ab9d98cc156e5b2097766dd9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3f2573db5afcd1a6ab9abcc5d48fc8e42584bc87ab9d98cc156e5b2097766dd9?s=96&d=mm&r=g","caption":"windows-vps"},"sameAs":["https:\/\/windows-vps.org\/blog","https:\/\/x.com\/myxiechengxuan"],"url":"https:\/\/windows-vps.org\/blog\/author\/myxiechengxuan\/"}]}},"_links":{"self":[{"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/posts\/1040","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/comments?post=1040"}],"version-history":[{"count":1,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/posts\/1040\/revisions"}],"predecessor-version":[{"id":1044,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/posts\/1040\/revisions\/1044"}],"wp:attachment":[{"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/media?parent=1040"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/categories?post=1040"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/tags?post=1040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}