SMSAgentSoftware / MEM

Microsoft Endpoint Manager related resources
26 stars 15 forks source link

Remediation Error #1

Closed kvnsmn closed 3 years ago

kvnsmn commented 3 years ago

We are having some issue with this script. I added it to Intune as:

Cannot convert argument "index", with value: "DisplayName", for "GetValue" to type "System.Int64": "Cannot convert value "DisplayName" to type "System.Int64". Error: "Input string was not in a correct format."" At C:\WINDOWS\IMECache\HealthScripts\ca9ef15e-637a-4fdd-aa14-4e6dc883fd9a_2\detect.ps1:22 char:13 + $Results += [PSCustomObject]@{ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodException + FullyQualifiedErrorId : MethodArgumentConversionInvalidCastArgument

SMSAgentSoftware commented 3 years ago

This happens if there are multiple versions of the Update tools installed.

SMSAgentSoftware commented 3 years ago

Code has been updated to handle this.