UpdateOS icon indicating copy to clipboard operation
UpdateOS copied to clipboard

EulaAccepted leads to an error

Open mdmplayground opened this issue 1 year ago • 1 comments

The Command if (!$.EulaAccepted) { $.EulaAccepted = $true } leads to an Error (sorry for the German error message):

Für "EulaAccepted" und die Argumentanzahl "1" wurde keine Überladung gefunden.
In C:\Windows\IMECache\12341234-1234-1234-1234-123412341234\OSUpdate.ps1:117 Zeichen:38
+             if (!$_.EulaAccepted) {  $_.EulaAccepted = $true }
+                                      ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], SetValueInvocationException
    + FullyQualifiedErrorId : RuntimeException

I came across this error when a feature upgrade needs to be installed during pre-provisioned deployment. The error also causes the feature upgrade to fail.

After some research I found a way to fix the error: if (!$_.EulaAccepted) { $_.AcceptEula() }

mdmplayground avatar May 29 '24 12:05 mdmplayground

I've run into the same issue here. 2024-06-11 12:01:54 PM Getting IsInstalled=0 and Type='Software' updates. Cannot find an overload for "EulaAccepted" and the argument count: "1" At C:\ProgramData\CVMMPA\UpdateOSDebloat\UpdateOS.ps1:140 char:37

  •         if (!$_.EulaAccepted) { $_.EulaAccepted = $true }
    
  •                                 ~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], SetValueInvocationException
    • FullyQualifiedErrorId : RuntimeException

Thanks mdmplayground for the info to resolve it , at least temporarily ! 👍

KeithCVMS avatar Jun 11 '24 20:06 KeithCVMS

I am getting the same issue, but a different error

2024/07/16 XX:XX:XX PM Opting into Microsoft Update
2024/07/16 XX:XX:XX PM Getting IsInstalled=0 and Type='Software' updates.
Element not found. (Exception from HRESULT: 0x8002802B (TYPE_E_ELEMENTNOTFOUND))
At C:\WINDOWS\IMECache\xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx_x\UpdateOS.ps1:100 char:37
+             if (!$_.EulaAccepted) { $_.EulaAccepted = $true }
+                                     ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], COMException
    + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException
Element not found. (Exception from HRESULT: 0x8002802B (TYPE_E_ELEMENTNOTFOUND))

This only seems to be impacting win11 devices for me. I tried your suggestion @mdmplayground but with no luck.

ITistheworst avatar Jul 16 '24 17:07 ITistheworst

@ITistheworst, your described error is actually a known issue with the latest cumulative update: https://www.neowin.net/amp/microsoft-confirmes-windows-update-api-0x8002802b-issues-in-kb5039302-offers-a-workaround/ Haven’t tried the workaround yet.

mdmplayground avatar Jul 16 '24 17:07 mdmplayground

Ahh of course! Thanks @mdmplayground, I have tried the KIR but it does still seem to show this error. Seems a bit inconsistent so hard to really draw a conclusion from my testing.

ITistheworst avatar Jul 18 '24 09:07 ITistheworst

I am having the same issue and getting this error message: Element not found. (Exception from HRESULT: 0x8002802B (TYPE_E_ELEMENTNOTFOUND)) I have not tried the KIR workaround.

kaspersmjohansen avatar Aug 21 '24 09:08 kaspersmjohansen

I checked in a change so that the script properly calls AcceptEula(), which should take care of the first issue. The second on, the 8002802B message, likely requires Microsoft's fix or the KIR workaround.

mtniehaus avatar Aug 21 '24 17:08 mtniehaus