We are having some issue with this script. I added it to Intune as:
Detection script Yes
Remediation script Yes
Run this script using the logged-on credentials No
Enforce script signature check No
Run script in 64-bit PowerShell Yes`
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
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