-
Notifications
You must be signed in to change notification settings - Fork 536
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
DSCParser error when generating reports. #4676
Comments
@Kimhal Can you provide a DSC configuration to reproduce the issue? |
@Kimhal I don't receive the error you mentioned, but another one ( Invoke-Expression, Missing type name after [ ). Silly question: Are you running the command in an administrative prompt? In my case it then succeeds. |
@FabienTschanz I'm running the command in a elevated prompt, but you are right about the error. I'm also is getting the ( Invoke-Expression, Missing type name after [ ) error. And like you it succeeds with generating a report. |
@Kimhal When I run your exact configuration in an elevated prompt, it works without any issues. The parser works as it is supposed to do in that case, unfortunately I am unable to reproduce your issue. No errors can be seen on the console. Can you try executing the command in an elevated Windows PowerShell (x64) session with Microsoft365DSC version If there is an error, please post the result of |
@FabienTschanz I've also had this issue once I installed 1.24.515.2 (which uses DSCParser v2, the code in question doesn't exist in v1) with my own different blueprints, somehow the error message went away and I cannot explain why. Nevertheless DSCParser also has other issues, see #4681, which I've already reported to @NikCharlebois |
@FabienTschanz I have updated the Microsoft365DSC module and run a Uninstall-M365DSCOutdatedDependencies. |
I initially had the error Cannot index into a null array but as explained that went away, nevertheless the error that @Kimhal is reporting now I still have it present with my configuration so there's definitely something going wrong here with the parser. |
@Kimhal Thank you very much for the error log. While searching in there, I discovered that the parser does not find the associated CIM type because it cannot connect to the CIM service. The logged error message is the following:
What happens if you run |
Makes sense since it calls Get-CimClass, regarding the containers in the pipelines they always need WinRM to be enabled whenever I'm performing deployments, since they are ephemeral, nevertheless my unit tests don't initialize it since it was never needed before like it seems to be now. I'm super busy right now and can't check it but most likely that would solve the problem for me. |
thanks guys. That worked for me.😁😁 |
May I ask what fixed the issue? |
Run |
Description of the issue
When I run the following command.
New-M365DSCReportFromConfiguration -Type 'Excel' -ConfigurationPath 'D:\Microsoft365DSC\Configuration.ps1' -OutputPath 'D:\Microsoft365DSC\Report.xlsx'
I receive the this error:
**Cannot index into a null array.
At C:\Program Files\WindowsPowerShell\Modules\DSCParser\2.0.0.4\Modules\DSCParser.psm1:420 char:9
Microsoft 365 DSC Version
1.24.515.1
Which workloads are affected
other
The DSC configuration
No response
Verbose logs showing the problem
No response
Environment Information + PowerShell Version
The text was updated successfully, but these errors were encountered: