Winget - Install/Update [Autofix,Param]
Summary
This script is created to install and update applications whose packages are available in Winget.
Please find the application package at the following URL: https://winget.run/search
File Hash
- Script Path:
C:\ProgramData\_Automation\Script\Invoke-WingetProcessor\Invoke-WingetProcessor.ps1 - File Hash (SHA256):
23E874EC415CEEF53A727074F6725B22A3F4DE094C59D20F0FE06F5CA87C267B - File Hash (MD5):
1F5C31B67B6E0DD1FD342709B45DDE1F
Sample Run

Dependencies
Global Variables
| Name | Value | Accepted Values | Description |
|---|---|---|---|
| Debug | False | False, True | When True, enables informational logging; when False (default), informational logs are suppressed to avoid adding entries to the h_scripts table. Set to True to assist with troubleshooting. |
| ScriptEngineEnableLogger | False | False, True | When True, enables final (success/failure) logging; when False (default), these logs are suppressed to avoid adding entries to the h_scripts table. Set to True to assist with troubleshooting. |
| ProjectName | Invoke-WingetProcessor | This references the Agnostic Script name without the .ps1 and should not be changed. |
User Parameters
| Name | Example | Required | Description |
|---|---|---|---|
| PackageId | Cisco.CiscoWebexMeetings | True | The Winget package you wish to install. |
| Scope | msstore, winget | True | The source to use when obtaining the package. |
| OptionalParameter | --Scope Machine | False | Specifies option parameters to deploy/update/remove the application(s) |
Process
Please refer to Invoke-WingetProcessor for the process.
Output
- Script Log
FAQ
Q. For auto-deployment of application we have monitor Application - Install/Update - [Winget], does the auto-deployment work with the optional parameter needed?
A. No, for auto-deployment you need to copy this script and have to set the OptionalParameter user param to the global parameter with the value set to it and apply that as an autofix because the auto-deployment monitor do not pass the optional parameter value.