ThomasKur / IntuneDocumentation

Automatic Intune Documentation to simplify the life of admins and consultants.
GNU General Public License v3.0
339 stars 87 forks source link

Error getting ADMX data #23

Closed timfoote closed 4 years ago

timfoote commented 4 years ago

Hi Thomas,

Seeing an error with ADMX device configuration profiles. Error output from the script is:


WARNING: 2020-02-12 13:38:42+10 WARN Error reading ADMX setting - [System.Management.Automation.RuntimeException] You cannot call a method on a null-valued expression. WARNING: Call the 'Connect-MSGraph' cmdlet to use the updated environment parameters. DEBUG: 2020-02-12 13:38:43+10 DEBUG Device Configuration (ADMX): Add-WordText : Object reference not set to an instance of an object. At C:\Program Files\WindowsPowerShell\Modules\IntuneDocumentation\2.0.11\Functions\Invoke-IntuneDocumentation.ps1:249 char:9

Add-WordTable : Cannot bind argument to parameter 'InputObject' because it is null. At C:\Program Files\WindowsPowerShell\Modules\IntuneDocumentation\2.0.11\Functions\Invoke-IntuneDocumentation.ps1:250 char:32

The word document contained the correct heading for the name of the profile but no data underneath it.

ThomasKur commented 4 years ago

It took some time to find the root cause. I created a new version which solves the issue. Please let me know if you still experience issue.