---
title: "Comment by Jamie Holmes on \"Get a better Intune policy report part 3. (FINAL)\" | Hashnode"
description: "Hi, Im getting a fair few errors returned when I run this and I end up with an almost empty report, seems like it is having trouble converting from the xml: PS"
url: "https://hashnode.com/posts/get-a-better-intune-policy-report-part-3-final/618ce1a2f991b025366e2501/comment/62cc0056222e2fa74e9bc8cb"
---

[Discussion](https://hashnode.com/posts/get-a-better-intune-policy-report-part-3-final/618ce1a2f991b025366e2501)

Comment [Get a better Intune policy report part 3. (FINAL)](https://hashnode.com/posts/get-a-better-intune-policy-report-part-3-final/618ce1a2f991b025366e2501)

[Jamie Holmes](https://hashnode.com/@stealthgeekjim)

[Jul 11, 2022](https://hashnode.com/posts/get-a-better-intune-policy-report-part-3-final/618ce1a2f991b025366e2501/comment/62cc0056222e2fa74e9bc8cb)

Hi, Im getting a fair few errors returned when I run this and I end up with an almost empty report, seems like it is having trouble converting from the xml:

PS C:\\WINDOWS\\system32> Get-ClientIntunePolicyResult -asHTML -showConnectionData -getDataFromIntune -Verbose -showURLs VERBOSE: Getting Intune data VERBOSE: Getting client Intune data via ConvertFrom-MDMDiagReportXML VERBOSE: Generating 'C:\\Users\\Public\\Documents\\MDMDiagnostics\\MDMDiagReport.xml'... VERBOSE: Converting 'C:\\Users\\Public\\Documents\\MDMDiagnostics\\MDMDiagReport.xml' to XML object VERBOSE: Getting EnrollmentID VERBOSE: Your EnrollmentID is 2380BB6B-9341-4A61-9662-371E30037C06 VERBOSE: Getting connection data VERBOSE: Getting Enrollments (MDMEnterpriseDiagnosticsReport.Resources.Enrollment) ConvertFrom-XML : Cannot process argument transformation on parameter 'XML'. Cannot convert value "System.Xml.XmlElement" 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." At C:\\Program Files\\WindowsPowerShell\\Modules\\IntuneStuff\\1.0.4\\IntuneStuff.psm1:484 char:98

-   ... riseDiagnosticsReport.Resources.Enrollment | % { ConvertFrom-XML $\_ }
-   ~~
    -   CategoryInfo : InvalidData: (:) \[ConvertFrom-XML\], ParameterBindingArgumentTransformationException
    -   FullyQualifiedErrorId : ParameterArgumentTransformationError,ConvertFrom-XML

ConvertFrom-XML : Cannot process argument transformation on parameter 'XML'. Cannot convert value "System.Xml.XmlElement" 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." At C:\\Program Files\\WindowsPowerShell\\Modules\\IntuneStuff\\1.0.4\\IntuneStuff.psm1:484 char:98

-   ... riseDiagnosticsReport.Resources.Enrollment | % { ConvertFrom-XML $\_ }
-   ~~
    -   CategoryInfo : InvalidData: (:) \[ConvertFrom-XML\], ParameterBindingArgumentTransformationException
    -   FullyQualifiedErrorId : ParameterArgumentTransformationError,ConvertFrom-XML

VERBOSE: Getting Policies (MDMEnterpriseDiagnosticsReport.PolicyManager.ConfigSource) ConvertFrom-XML : Cannot process argument transformation on parameter 'XML'. Cannot convert value "System.Xml.XmlElement" 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." At C:\\Program Files\\WindowsPowerShell\\Modules\\IntuneStuff\\1.0.4\\IntuneStuff.psm1:638 char:107

-   ... agnosticsReport.PolicyManager.ConfigSource | % { ConvertFrom-XML $\_ }
-   ~~
    -   CategoryInfo : InvalidData: (:) \[ConvertFrom-XML\], ParameterBindingArgumentTransformationException
    -   FullyQualifiedErrorId : ParameterArgumentTransformationError,ConvertFrom-XML

ConvertFrom-XML : Cannot process argument transformation on parameter 'XML'. Cannot convert value "System.Xml.XmlElement" 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." At C:\\Program Files\\WindowsPowerShell\\Modules\\IntuneStuff\\1.0.4\\IntuneStuff.psm1:638 char:107

-   ... agnosticsReport.PolicyManager.ConfigSource | % { ConvertFrom-XML $\_ }
-   ~~
    -   CategoryInfo : InvalidData: (:) \[ConvertFrom-XML\], ParameterBindingArgumentTransformationException
    -   FullyQualifiedErrorId : ParameterArgumentTransformationError,ConvertFrom-XML

[Ondrej Sebela](https://hashnode.com/@AndrewZtrhgf)

[Jul 11, 2022](https://hashnode.com/posts/get-a-better-intune-policy-report-part-3-final/618ce1a2f991b025366e2501/comment/62cc0056222e2fa74e9bc8cb#reply-62cc0544bffc4694f5bc729e)

Will check this today. Thanks for feedback 👍

[Ondrej Sebela](https://hashnode.com/@AndrewZtrhgf)

[Jul 11, 2022](https://hashnode.com/posts/get-a-better-intune-policy-report-part-3-final/618ce1a2f991b025366e2501/comment/62cc0056222e2fa74e9bc8cb#reply-62cc08f6222e2fa74e9bcb07)

I am afraid I will need to see your XML Intune report file. Please DM on Twitter [Ondrej Sebela](https://hashnode.com/@AndrewZtrhgf)

[Ondrej Sebela](https://hashnode.com/@AndrewZtrhgf)

[Aug 4, 2022](https://hashnode.com/posts/get-a-better-intune-policy-report-part-3-final/618ce1a2f991b025366e2501/comment/62cc0056222e2fa74e9bc8cb#reply-62ec3252f583cc2636e5456a)

It should be fixed in the new version of the InstuneStuff module. Run Install-Module IntuneStuff to get it 👍
