Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#4622·winget-cli

`Update-WinGetPackage -WhatIf`: Installs the update instead of saying what it would do

Author: schittliCreated Jul 8, 2024Updated Sep 24, 2026
LabelsIssue-BugPowerShellCommand-Upgrade

Brief description of your issue

If one starts Update-WinGetPackage -WhatIf then it installs the update instead of saying what it would do

Steps to reproduce

Just start Update-WinGetPackage -WhatIf for any package

Expected behavior

Of course, as is always the case with PowerShell: A CmdLet only shows what it would do. (Do we need to explain this to Microsoft? I wonder that Microsoft does not have unit-tests for default parameters.)

Actual behavior

If one starts Update-WinGetPackage -WhatIf then it installs the update instead of saying what it would do

Environment

bash
Windows Package Manager v1.8.1791
Windows: Windows.Desktop v10.0.19045.2006
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.23.1791.0

Source: microsoft/winget-cli

View original on GitHubView discussion on GitHub