Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoke-MSIntuneDriverUpdate.ps1 XML Parse Error #44

Open
wbauer-isd94 opened this issue Jan 7, 2022 · 0 comments
Open

Invoke-MSIntuneDriverUpdate.ps1 XML Parse Error #44

wbauer-isd94 opened this issue Jan 7, 2022 · 0 comments

Comments

@wbauer-isd94
Copy link

On my Lenovo machine, the Invoke-MSIntuneDriverUpdate.ps1 update script seems to be failing to parse the catalog.xml file from Lenovo's website.

The console output indicates that the $global:LenovoModelXML variable is null.

You cannot call a method on a null-valued expression.
At [file path]\MSEndpointMgr\Intune\Drivers\Invoke-MSIntuneDriverUpdate.ps1:268 char:4
+             $global:LenovoModelXML.GetType().FullName | Out-Null
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

I did some debugging and the value $global:LenovoModelXML seems to be null because the script is having trouble parsing the catalog.xml file. The log shows the following:

<![LOG[Error: Cannot convert value "???<?xml version="1.0" encoding="utf-8"?>
<Products>
  <Product model="Tablet10" family="len" os="win10" build="*">
    <Queries>
      <Types>
            ...
            [truncated - goes on to show entire catalog.xml file]
            ...
</Products>" to type "System.Xml.XmlDocument". Error: "The specified node cannot be inserted as the valid child of this node, because the specified node is the wrong type."]LOG]!><time="19:34:24.399+-360" date="01-06-2022" component="DriverAutomationScript" context="[my username]" type="3" thread="18112" file="">

Could this be related to the XML file's UTF-8 encoding? Some sources seem to indicate that the ??? at the beginning of the file in the log may be a Byte Order Mark (BOM) that's causing problems with parsing.

It doesn't seem like this is specific to my environment, but I'd take any suggestions.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant