Winget App Audit
Summary
The script conducts an audit of the computer for applications supported by Winget and stores the information in a custom table called pvl_winget_audit. It retrieves data for both system-level and user-level applications. However, user-level application data will not be retrieved if there are no logged-in users on the computer.
Update Notice: 02-April-2025
A new column has been introduced to pvl_winget_audit table. To update the table's structure, run the script with the Set_Environment parameter set to 1 after importing it.
Sample Run
First Run: Run the script with the Set_Environment parameter set to 1 for the first run to create the pvl_winget_audit table used by the solution.
Regular Execution:
Dependencies
- Internal Monitor - Execute Script - Winget App Audit
- Script - OverFlowedVariable - SQL Insert - Execute
- Solution - Winget Auto Update
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. |
Variables
| Name | Description |
|---|---|
| projectName | Get-WingetReport |
| workingDirectory | C:\ProgramData_automation\script\Get-WingetReport |
| scriptPath | C:\ProgramData_automation\script\Get-WingetReport\Get-WingetReport.ps1 |
| jsonPath | C:\ProgramData_automation\script\Get-WingetReport\Get-WingetReport.json |
| tableName | pvl_winget_audit |
User Parameters
| Name | Example | Required | Description |
|---|---|---|---|
| Set_Environment | 1 | True (for first execution) | Run the script with the Set_Environment parameter set to 1 for the first run to create the pvl_winget_audit table used by the solution. |
Output
- Script log
- Custom table
- Dataview
Changelog
2026-04-06
- Code signed PowerShell script
- Updated the downloadUrl for both 7zr.exe and 7z.7z
2026-01-20
- The agnostic for the script had bugs related to nvoke-webrequest and was throwing incorrect DISM Error When Adding "Provisioned" Package. After the agnostic got fixed, the automate implementation was updated to fix the failures.
2025-04-10
- Adjusted the script to reset the $AutoUpdateRunTime variable in the foreach loop
2025-04-08
- Initial version of the document