---
title: "Comment by Jony Doe on \"Get a better Intune policy report part 3. (FINAL)\" | Hashnode"
description: "Hey, nice work but your Module needs some polish and errorhandling. To fullfill the requirements you need to install &quot;AzureRM.profile&quot; and RSAT (for A"
url: "https://hashnode.com/posts/get-a-better-intune-policy-report-part-3-final/618ce1a2f991b025366e2501/comment/62ebcb5bcbce7c268014d8c6"
---

[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)

[Jony Doe](https://hashnode.com/@TrxRx)

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

Hey, nice work but your Module needs some polish and errorhandling. To fullfill the requirements you need to install "AzureRM.profile" and RSAT (for ActiveDirectory Cmdlets). After that you kind of getting a report but it's missing some stuff.

I am also hanging at the point of [Jamie Holmes](https://hashnode.com/@stealthgeekjim) with the ConvertFrom-XML cmdlet. In Addition I am also getting this errors (German UI Language) after adding PoshFunctions to accomplish the ConvertFrom-XML requirement (without PoshFunctions the cmdlet is just unknown)

```
ConvertFrom-XML : Die Argumenttransformation für den Parameter "XML" kann nicht verarbeitet werden. Der Wert "System.Xml.XmlElement" kann nicht in den Typ "System.Xml.XmlDocument" konvertiert werden. Fehler: "Der angegebene Knoten 
konnte nicht als gültiger untergeordneter Knoten eingefügt werden, da der angegebene Knoten den falschen Typ hat."
In C:\Program Files\WindowsPowerShell\Modules\IntuneStuff\1.0.5\IntuneStuff.psm1:857 Zeichen:131
+ ... eDesktopAppManagementinfo.MsiInstallations | % { ConvertFrom-XML $_ }
+                                                                      ~~
    + CategoryInfo          : InvalidData: (:) [ConvertFrom-XML], ParameterBindingArgumentTransformationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,ConvertFrom-XML

Get-ItemPropertyValue : Die Eigenschaft LastUpdatedTimeUtc ist im Pfad HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IntuneManagementExtension\Win32Apps\00000000-0000-0000-0000-000000000000\GRS nicht vorhanden.
In C:\Program Files\WindowsPowerShell\Modules\IntuneStuff\1.0.5\IntuneStuff.psm1:1469 Zeichen:39
+ ... edTimeUtc = Get-ItemPropertyValue $newestWin32AppRecord.PSPath -Name  ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-ItemPropertyValue], PSArgumentException
    + FullyQualifiedErrorId : Argument,Microsoft.PowerShell.Commands.GetItemPropertyValueCommand

Get-ItemPropertyValue : Die Eigenschaft LastUpdatedTimeUtc ist im Pfad HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IntuneManagementExtension\Win32Apps\f88474cf-0063-42e2-b7d2-f0d342f3ce5f\GRS nicht vorhanden.
In C:\Program Files\WindowsPowerShell\Modules\IntuneStuff\1.0.5\IntuneStuff.psm1:1469 Zeichen:39
+ ... edTimeUtc = Get-ItemPropertyValue $newestWin32AppRecord.PSPath -Name  ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-ItemPropertyValue], PSArgumentException
    + FullyQualifiedErrorId : Argument,Microsoft.PowerShell.Commands.GetItemPropertyValueCommand

Fehler beim Aufrufen der Methode, da [System.Management.Automation.PSObject] keine Methode mit dem Namen "op_Addition" enthält.
In C:\Program Files\WindowsPowerShell\Modules\IntuneStuff\1.0.5\IntuneStuff.psm1:1633 Zeichen:9
+         $intuneXMLReport += New-Object -TypeName PSObject -Property $ ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (op_Addition:String) [], RuntimeException
    + FullyQualifiedErrorId : MethodNotFound
```

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

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

Thanks for feedback! Now I know where the problem is and it should be fixed now, just run "Install-Module IntuneStuff" to get new fixed version.

When I've migrated this function to module, I forgot to include my own ConvertFrom-XML function as it is not the same as in PoshFunctions.

It would be great if you could test this again and let me know.

Thanks

[Jony Doe](https://hashnode.com/@TrxRx)

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

[Ondrej Sebela](https://hashnode.com/@AndrewZtrhgf) While updating your Module it hangs at the point for completion. It takes like 1-2min.

Running: Get-ClientIntunePolicyResult -asHTML -getDataFromIntune -showConnectionData -showEnrollmentIDs -showURLs

```
Throws: WARNUNG: Fehler beim Initialisieren des Standardlaufwerks: "Es wurde kein Standardserver gefunden, auf dem die Active Directory-Webdienste ausgeführt werden.".
```

And than nothing happens for another 1-2 minutes.

And than throws

```
Get-ItemPropertyValue : Die Eigenschaft LastUpdatedTimeUtc ist im Pfad HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IntuneManagementExtension\Win32Apps\00000000-0000-0000-0000-000000000000\GRS nicht vorhanden.
In C:\Program Files\WindowsPowerShell\Modules\IntuneStuff\1.0.7\IntuneStuff.psm1:1477 Zeichen:39
+ ... edTimeUtc = Get-ItemPropertyValue $newestWin32AppRecord.PSPath -Name  ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-ItemPropertyValue], PSArgumentException
    + FullyQualifiedErrorId : Argument,Microsoft.PowerShell.Commands.GetItemPropertyValueCommand

Get-ItemPropertyValue : Die Eigenschaft LastUpdatedTimeUtc ist im Pfad HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IntuneManagementExtension\Win32Apps\f88474cf-0063-42e2-b7d2-f0d342f3ce5f\GRS nicht vorhanden.
In C:\Program Files\WindowsPowerShell\Modules\IntuneStuff\1.0.7\IntuneStuff.psm1:1477 Zeichen:39
+ ... edTimeUtc = Get-ItemPropertyValue $newestWin32AppRecord.PSPath -Name  ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-ItemPropertyValue], PSArgumentException
    + FullyQualifiedErrorId : Argument,Microsoft.PowerShell.Commands.GetItemPropertyValueCommand
```

But the Report seems to work and look very detailed. Maybe this causes the waiting (at least 2min).

It would be nice to see the origin of the Settings. E.g. if you are using Security Baseline (which contains many CSPs) and see the report and want to change some settings (or other Configs) it would be nice to know the exact Config Profile. As you do with Softwareinstallation and Script Displayname. \[I would suggest in the Polcy tab, next to "Scope".

Also PolicyDetailsURL (and PolicyURL) should be as href for an easy click. ;) Links could also be implemented into the Displayname with exact link to the Config Profile.

**It's really a great tool/report. :)** Thanks for that.

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

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

[Jony Doe](https://hashnode.com/@TrxRx)

I see.

This GRS registry key is relatively new thing. I will fix it tomorrow. (for now you can edit the function so it doesn't end there and continue instead)

According the active directory module. If you import it in ps console, does it show same error too? Anyway this error isn't related to my function. I saw it in past and solution was to explicitly select DC in the AD cmdlets (I think)

[Jony Doe](https://hashnode.com/@TrxRx)

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

[Ondrej Sebela](https://hashnode.com/@AndrewZtrhgf) Great work. I edited my previous comment with some details and little feature request. It would be great if you find the time to implement it. Thanks a lot :)

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

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

[Jony Doe](https://hashnode.com/@TrxRx)

GRS errors are fixed now. Thanks for reporting all the errors 👍

According to the feature requests:

-   clickable hrefs: I am using PSWriteHTML module (New-HTMLTable command) to generate the HTML and I don't think this is possible because it takes the input as plain text (and not as HTML code)
    
-   policy names: I have to look into this, but no promises because I don't have much time right now
