Microsoft365DSC icon indicating copy to clipboard operation
Microsoft365DSC copied to clipboard

New-M365DSCReportFromConfiguration: parsed content was null

Open febenitezc opened this issue 2 years ago • 8 comments

Description of the issue

Unable to run following script:

PowerShell Error How to Install - Microsoft365DSC - Your Cloud Configuration

Validate that the customer runs PowerShell version 5.1 and 7.3+

Install-Module Microsoft365DSC -Force

Update-M365DSCDependencies

Get-Module Microsoft365DSC -ListAvailable | select ModuleBase, Version

Update-Module Microsoft365DSC

Update-M365DSCDependencies

Export-M365DSCConfiguration -LaunchWebUI

#make sure to select all checkboxes and option from the GUI

#Planner, Power Platform, can be excluded from the selection.

Microsoft 365 DSC Version

PROD

Which workloads are affected

Azure Active Directory (Entra ID), Exchange Online, Intune, Office 365 Admin, Security & Compliance Center, SharePoint Online

The DSC configuration

No response

Verbose logs showing the problem

No response

Environment Information + PowerShell Version

No response

febenitezc avatar Apr 15 '24 21:04 febenitezc

Can someone please point me on the right direction to resolve issue above? "parsed content was null"

febenitezc avatar Apr 15 '24 21:04 febenitezc

Can you confirm that your configuration.ps1 holds a configuration? In most cases this exception is due to an empty configuration or file.

andikrueger avatar Apr 15 '24 22:04 andikrueger

Hi Andi,

Thanks for taking the time to answer my question. What do you mean by holding a configuration? This is the script that is available on github and makes reference to Microsoft365DSC.

Can you please elaborate on your answer? Please, check documentation on the script from the link, and let me know if I missed anything here.

Cheers

febenitezc avatar Apr 15 '24 23:04 febenitezc

Please open the file at c:\temp\securitychecks\config.ps1 and check if there are any resources in Node localhost {}

andikrueger avatar Apr 16 '24 06:04 andikrueger

What should be the correct configuration under that script? All the script that I'm running are from Github.

Can you please provide an example that what is supposed to be under that file? Node localhost {}

febenitezc avatar Apr 16 '24 11:04 febenitezc

Depending on the selected resources the file should contain something like the first Example on this page here:

https://microsoft.github.io/Microsoft365DSC/resources/azure-ad/AADApplication/

andikrueger avatar Apr 16 '24 12:04 andikrueger

Thanks Andi,

I was under the impression the configuration file is already filled out with that information. Do we have to manually build that file?

I read from another blog with similar error that we must run the command Import-DscResource -ModuleName Microsoft365DSC

Is that correct?

febenitezc avatar Apr 16 '24 14:04 febenitezc

Hello,

It might be related to this issue: https://github.com/microsoft/Microsoft365DSC/issues/4505

Kierow avatar Apr 17 '24 15:04 Kierow