Open Mazhub551 opened 2 months ago
First, can you please update the Microsoft365DSC module using Install-Module Microsoft365DSC -Force
and then Update-M365DSCModule
, both running in an elevated Windows PowerShell session?
@Mazhub551 Please give us an update on the situation or close the issue if it is working for you now.
I'm getting this same error. Running this command: New-M365DSCReportFromConfiguration -type Excel -ConfigurationPath "C:\Users**s\Output*SecCom.ps1" -OutputPath C:\Users\\output**SecCom.xlsx The excel report does open, but only populates one of the components. (SCComplianceSearch) The original config file was created using this command and the PS1 does contain a lot of data. Export-M365DSCConfiguration -Components @("SCAuditConfigurationPolicy", "SCAutoSensitivityLabelPolicy", "SCAutoSensitivityLabelRule", "SCCaseHoldPolicy", "SCCaseHoldRule", "SCComplianceCase", "SCComplianceSearch", "SCComplianceSearchAction", "SCComplianceTag", "SCDeviceConditionalAccessPolicy", "SCDeviceConfigurationPolicy", "SCDLPCompliancePolicy", "SCDLPComplianceRule", "SCFilePlanPropertyAuthority", "SCFilePlanPropertyCategory", "SCFilePlanPropertyCitation", "SCFilePlanPropertyDepartment", "SCFilePlanPropertyReferenceId", "SCFilePlanPropertySubCategory", "SCLabelPolicy", "SCProtectionAlert", "SCRetentionCompliancePolicy", "SCRetentionComplianceRule", "SCRetentionEventType", "SCRoleGroup", "SCRoleGroupMember", "SCSecurityFilter", "SCSensitivityLabel", "SCSupervisoryReviewPolicy", "SCSupervisoryReviewRule") -Credential $Credential -Filename **SecCom.ps1
@BPJac Are you on the latest version of Microsoft365DSC? Get-Module Microsoft365DSC -ListAvailable
@FabienTschanz yes I believe so, and also Powershell 7.4.6 PS C:\Users****> Get-Module Microsoft365DSC -ListAvailable | fl
Name : Microsoft365DSC Path : C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.1120.1\Microsoft365DSC.psd1 Description : This DSC module is used to configure and monitor Microsoft tenants, including SharePoint Online, Exchange, Teams, etc. ModuleType : Manifest Version : 1.24.1120.1 PreRelease : NestedModules : {M365DSCAgent, M365DSCDocGenerator, M365DSCErrorHandler, M365DSCLogEngine…} ExportedFunctions : {Test-M365DSCAgent, Set-M365DSCAgentCertificateConfiguration, Get-ResourceExampleAsMarkdown, New-DscMofResourceWikiPage…} ExportedCmdlets : {Assert-M365DSCBlueprint, Compare-M365DSCConfigurations, Confirm-M365DSCDependencies, Export-M365DSCConfiguration…} ExportedVariables : ExportedAliases :
Is there any other output mentioned after the error? What happens if you run the command in an elevated PowerShell window? How does it look like if you're using Windows PowerShell 5.1?
Description of the issue
When I am trying to export the report from DSC configuration I am getting the below error. InvalidOperation: Cannot index into a null array.
The module and all its dependencies are running on latest version.
The export to the excel file fails to complete and abruptly closes without exporting the full report.
Microsoft 365 DSC Version
1.24.828.1
Which workloads are affected
Azure Active Directory (Entra ID)
The DSC configuration
Verbose logs showing the problem
Environment Information + PowerShell Version
No response