The problem
Scheduled task runs successfully but the script Refresh-WingetConfiguration.ps1 exits without failure due to the following function Invoke-TranslateMDMEnrollmentType that fails to process an array.
Invoke-TranslateMDMEnrollmentType : Cannot process argument transformation on parameter 'Id'. Cannot convert the "System.Object[]" value of type "System.Object[]" to type "System.Int32".
The output from Get-Item -Path HKLM:\SOFTWARE\Microsoft\Enrollments\* | Get-ItemProperty | Where-Object -FilterScript {$null -ne $_.UPN} is returning two values 6, 26 as an array object.
$EnrollmentKey | select AADResourceID,ProviderID,EnrollmentType
AADResourceID ProviderID EnrollmentType
------------- ---------- --------------
https://manage.microsoft.com/ MS DM Server 6
https://checkin.dm.microsoft.com Microsoft Device Management 26
There is no other logs generated when these functions fail.
What version of WAU has the issue?
1.07.0020
What version of Windows are you using (ex. Windows 11 22H2)?
Windows 11 25H2, Windows 11 24H2
What version of winget are you using?
1.28.240
Log information
No log output generated because the Refresh-WingetConfiguration.ps1 function Get-MDMEnrollmentStatus fails.
Additional information
We noticed that application updates stopped around March 2026.
The problem
Scheduled task runs successfully but the script
Refresh-WingetConfiguration.ps1exits without failure due to the following functionInvoke-TranslateMDMEnrollmentTypethat fails to process an array.The output from
Get-Item -Path HKLM:\SOFTWARE\Microsoft\Enrollments\* | Get-ItemProperty | Where-Object -FilterScript {$null -ne $_.UPN}is returning two values6, 26as an array object.There is no other logs generated when these functions fail.
What version of WAU has the issue?
1.07.0020
What version of Windows are you using (ex. Windows 11 22H2)?
Windows 11 25H2, Windows 11 24H2
What version of winget are you using?
1.28.240
Log information
Additional information
We noticed that application updates stopped around March 2026.