Closed dominicbuehrer closed 1 month ago
@dominicbuehrer Please update to Microsoft365DSC 1.24.1002.1 using Update-M365DSCModule
. The problem should then be clearer. It's either running winrm quickconfig -force
or running the command in an administrative Windows PowerShell session.
Hi @FabienTschanz
Thanks for your response. I've updated the module and it dependencies and now the M365DSCReportFromConfiguration for AAD does not work either.
i'm running the command in an administrative PowerShell session. Also winrm is running.
C:\Windows\system32 () 2024-10-03 17:02:24.373 (+02:00)> winrm quickconfig -force WinRM service is already running on this machine. WinRM is already set up for remote management on this computer.
I guess you restarted the PowerShell session, right? That's necessary, otherwise some things will still remain in memory for the time being.
Can you please share a minimal version of your EXO_Custom_ConfigurationData.ps1
file? Then we can have a look at it.
For the time being, I have something for you to test. Can you please run the following scripts? They will check if the DSCParser works correctly in your environment. Test-ConvertToDSCObjectV5.ps1.txt Test-ConvertToDSCObjectV4.ps1.txt
@FabienTschanz
Looks like this is the issue from the config:
Any chance this can be ignored or must the disclaimer text be changed?
Puh that's nasty. Can you please remove the second escape quote where there are doubles?
``"100%``" --> `"100%`"
Also, can you please copy the text from the transport rule how it's shown in the Exchange environment and upload it by text file here? Then I can try and have a look at optimizing the output.
With your suggested modification it works fine.
Here the config from EXO and the one from the M365 DSC report.
Yeah, you have to update the disclaimer text to not include any of the escape quotes (in Exchange Online) to have a correct export. In PowerShell, you do have to specify them since there are additional " double quotes in the HTML text which otherwise would break the parsing. Does that make any sense?
This resource already caused issues in the past, I talked about it with @andikrueger and the idea was that the fields need to be properly escaped otherwise you get this problem.
So you mean even more escapes to the escapes if escapes are present? That's gonna be a real nightmare...
Here's the issue I was talking about where we discussed this #4377
Okay I see, so escaping the escape quotes is still missing. I'll take a look at that.
Description of the issue
I export the EXO configuration with defined components and certificate authentication using an app registration.
Export-M365DSCConfiguration
-Components $CustomComponents
-Path ("$LogPath\$Workload")-FileName ("$($Workload)_$($Mode)_ConfigurationData.ps1")
-ConfigurationName ("$($Workload)_$($Mode)_ConfigurationData.psd1")-ApplicationId $ApplicationId
-TenantId $TenantId ` -CertificateThumbprint $CertificateThumbprintThis works absolutly fine. But when I try to create a new html report from the configuration it fails. The html report was succesfully created for AAD and SPO
Components: EXOAcceptedDomain EXOActiveSyncDeviceAccessRule EXOAddressBookPolicy EXOAddressList EXOAntiPhishPolicy EXOAntiPhishRule EXOApplicationAccessPolicy EXOAtpPolicyForO365 EXOAuthenticationPolicy EXOAuthenticationPolicyAssignment EXOAvailabilityAddressSpace EXOAvailabilityConfig EXOCASMailboxPlan EXOClientAccessRule EXODataClassification EXODataEncryptionPolicy EXODkimSigningConfig EXOEmailAddressPolicy EXOGlobalAddressList EXOHostedConnectionFilterPolicy EXOHostedContentFilterPolicy EXOHostedContentFilterRule EXOHostedOutboundSpamFilterPolicy EXOHostedOutboundSpamFilterRule EXOInboundConnector EXOIntraOrganizationConnector EXOIRMConfiguration EXOJournalRule EXOMailboxPlan EXOMailTips EXOMalwareFilterPolicy EXOMalwareFilterRule EXOManagementRole EXOManagementRoleAssignment EXOMessageClassification EXOMobileDeviceMailboxPolicy EXOOfflineAddressBook EXOOMEConfiguration EXOOnPremisesOrganization EXOOrganizationConfig EXOOrganizationRelationship EXOOutboundConnector EXOOwaMailboxPolicy EXOPartnerApplication EXOPerimeterConfiguration EXOPolicyTipConfig EXOQuarantinePolicy EXORemoteDomain EXOReportSubmissionPolicy EXOReportSubmissionRule EXOResourceConfiguration EXORoleAssignmentPolicy EXORoleGroup EXOSafeAttachmentPolicy EXOSafeAttachmentRule EXOSafeLinksPolicy EXOSafeLinksRule EXOSharingPolicy EXOTransportConfig EXOTransportRule EXORecipientPermission EXOManagementRoleEntry
Microsoft 365 DSC Version
V1.24.904.1
Which workloads are affected
Exchange Online
The DSC configuration
Verbose logs showing the problem
Environment Information + PowerShell Version