Skip to main content

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.
First Run

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.
First Run

Regular Execution:
Regular Execution

Dependencies

Global Variables

NameValueAccepted ValuesDescription
DebugFalseFalse, TrueWhen 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.
ScriptEngineEnableLoggerFalseFalse, TrueWhen 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

NameDescription
projectNameGet-WingetReport
workingDirectoryC:\ProgramData_automation\script\Get-WingetReport
scriptPathC:\ProgramData_automation\script\Get-WingetReport\Get-WingetReport.ps1
jsonPathC:\ProgramData_automation\script\Get-WingetReport\Get-WingetReport.json
tableNamepvl_winget_audit

User Parameters

NameExampleRequiredDescription
Set_Environment1True (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