-
Notifications
You must be signed in to change notification settings - Fork 532
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
Unable to generate HTML report from PlannerTask #5775
Comments
@WillBuck99 This will probably be fixed by #5767. We currently have an issue that the export misses escaping a couple of quotes. |
I have similar issue. For a particular tenant I was facing a lot of issues, because organization uses many 'bad' characters in various places. For example, Lithuanian symbols in group/policy names like "ĄČĘĖĮŠŲŪŽ", also there are a lot of groups with names containing ", ', etc. symbols. I understand that this is not the best idea, but this is customer's tenant, and we can't change all the names. I would be more than happy to help with demonstration or providing any additional information. Thank you for an amazing tool you're developing! |
Thank you @FabienTschanz for the quick response. I'll keep my eye out for the release. Other than that the tool has been extremely useful to us, so thank you for your work on it. @Vorland - That looks like pretty much the exact issue I've been facing. Attempted some parsing to remove the chunks that were causing it, but with how much data is in the report it wasn't feasable. For me, it only seems to be on this particular PlannerTask report that's causing issues, so for now I'm just not running the PlannerTask component but I can see how it could be affecting people who have different languages in their environment for naming conventions at a much larger scale than just one component. |
@Vorland Would you be so kind and provide a minimal sample of the configuration that's failing? Then I can check if it's part of the things we're currently fixing. They should be available starting Thursday with the latest release. @WillBuck99 Same for you, do you have a minimal sample of your PlannerTask? |
@FabienTschanz In my case I've tried workload by workload, usually selecting all the components. For me it was failing in Intune (all the components selected) and Exchange (most of the components selected). I was able to get ps1 configuration file, but wasn't able to generate any type of report. Intune Components: @("IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy", "IntuneAccountProtectionLocalUserGroupMembershipPolicy", "IntuneAccountProtectionPolicy", "IntuneAntivirusPolicyWindows10SettingCatalog", "IntuneAppConfigurationDevicePolicy", "IntuneAppConfigurationPolicy", "IntuneApplicationControlPolicyWindows10", "IntuneAppProtectionPolicyAndroid", "IntuneAppProtectionPolicyiOS", "IntuneASRRulesPolicyWindows10", "IntuneAttackSurfaceReductionRulesPolicyWindows10ConfigManager", "IntuneDeviceAndAppManagementAssignmentFilter", "IntuneDeviceCategory", "IntuneDeviceCleanupRule", "IntuneDeviceCompliancePolicyAndroid", "IntuneDeviceCompliancePolicyAndroidDeviceOwner", "IntuneDeviceCompliancePolicyAndroidWorkProfile", "IntuneDeviceCompliancePolicyiOs", "IntuneDeviceCompliancePolicyMacOS", "IntuneDeviceCompliancePolicyWindows10", "IntuneDeviceConfigurationAdministrativeTemplatePolicyWindows10", "IntuneDeviceConfigurationCustomPolicyWindows10", "IntuneDeviceConfigurationDefenderForEndpointOnboardingPolicyWindows10", "IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10", "IntuneDeviceConfigurationDomainJoinPolicyWindows10", "IntuneDeviceConfigurationEmailProfilePolicyWindows10", "IntuneDeviceConfigurationEndpointProtectionPolicyWindows10", "IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10", "IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10", "IntuneDeviceConfigurationIdentityProtectionPolicyWindows10", "IntuneDeviceConfigurationImportedPfxCertificatePolicyWindows10", "IntuneDeviceConfigurationKioskPolicyWindows10", "IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10", "IntuneDeviceConfigurationPkcsCertificatePolicyWindows10", "IntuneDeviceConfigurationPlatformScriptMacOS", "IntuneDeviceConfigurationPlatformScriptWindows", "IntuneDeviceConfigurationPolicyAndroidDeviceAdministrator", "IntuneDeviceConfigurationPolicyAndroidDeviceOwner", "IntuneDeviceConfigurationPolicyAndroidOpenSourceProject", "IntuneDeviceConfigurationPolicyAndroidWorkProfile", "IntuneDeviceConfigurationPolicyiOS", "IntuneDeviceConfigurationPolicyMacOS", "IntuneDeviceConfigurationPolicyWindows10", "IntuneDeviceConfigurationSCEPCertificatePolicyWindows10", "IntuneDeviceConfigurationSecureAssessmentPolicyWindows10", "IntuneDeviceConfigurationSharedMultiDevicePolicyWindows10", "IntuneDeviceConfigurationTrustedCertificatePolicyWindows10", "IntuneDeviceConfigurationVpnPolicyWindows10", "IntuneDeviceConfigurationWindowsTeamPolicyWindows10", "IntuneDeviceConfigurationWiredNetworkPolicyWindows10", "IntuneDeviceEnrollmentLimitRestriction", "IntuneDeviceEnrollmentPlatformRestriction", "IntuneDeviceEnrollmentStatusPageWindows10", "IntuneDeviceRemediation", "IntuneDiskEncryptionMacOS", "IntuneEndpointDetectionAndResponsePolicyWindows10", "IntuneExploitProtectionPolicyWindows10SettingCatalog", "IntunePolicySets", "IntuneRoleAssignment", "IntuneRoleDefinition", "IntuneSettingCatalogASRRulesPolicyWindows10", "IntuneSettingCatalogCustomPolicyWindows10", "IntuneWifiConfigurationPolicyAndroidDeviceAdministrator", "IntuneWifiConfigurationPolicyAndroidEnterpriseDeviceOwner", "IntuneWifiConfigurationPolicyAndroidEnterpriseWorkProfile", "IntuneWifiConfigurationPolicyAndroidForWork", "IntuneWifiConfigurationPolicyAndroidOpenSourceProject", "IntuneWifiConfigurationPolicyIOS", "IntuneWifiConfigurationPolicyMacOS", "IntuneWifiConfigurationPolicyWindows10", "IntuneWindowsAutopilotDeploymentProfileAzureADHybridJoined", "IntuneWindowsAutopilotDeploymentProfileAzureADJoined", "IntuneWindowsInformationProtectionPolicyWindows10MdmEnrolled", "IntuneWindowsUpdateForBusinessDriverUpdateProfileWindows10", "IntuneWindowsUpdateForBusinessFeatureUpdateProfileWindows10", "IntuneWindowsUpdateForBusinessRingUpdateProfileWindows10") Exchange Components: @("EXOAcceptedDomain", "EXOAddressList", "EXOAntiPhishPolicy", "EXOAntiPhishRule", "EXOApplicationAccessPolicy", "EXOAtpPolicyForO365", "EXOAuthenticationPolicy", "EXOAuthenticationPolicyAssignment", "EXOAvailabilityAddressSpace", "EXOAvailabilityConfig", "EXOCalendarProcessing", "EXOCASMailboxPlan", "EXOCASMailboxSettings", "EXOClientAccessRule", "EXODataClassification", "EXODataEncryptionPolicy", "EXODistributionGroup", "EXODkimSigningConfig", "EXOEmailAddressPolicy", "EXOGlobalAddressList", "EXOGroupSettings", "EXOHostedConnectionFilterPolicy", "EXOHostedContentFilterPolicy", "EXOHostedContentFilterRule", "EXOHostedOutboundSpamFilterPolicy", "EXOHostedOutboundSpamFilterRule", "EXOInboundConnector", "EXOIntraOrganizationConnector", "EXOIRMConfiguration", "EXOJournalRule", "EXOMailboxAutoReplyConfiguration", "EXOMailboxCalendarFolder", "EXOMailboxPermission", "EXOMailboxPlan", "EXOMailboxSettings", "EXOMailTips", "EXOMalwareFilterPolicy", "EXOMalwareFilterRule", "EXOManagementRole", "EXOManagementRoleAssignment", "EXOManagementRoleEntry", "EXOMessageClassification", "EXOMobileDeviceMailboxPolicy", "EXOOMEConfiguration", "EXOOrganizationConfig", "EXOOrganizationRelationship", "EXOOutboundConnector", "EXOOwaMailboxPolicy", "EXOPartnerApplication", "EXOPerimeterConfiguration", "EXOPlace", "EXOPolicyTipConfig", "EXOQuarantinePolicy", "EXORecipientPermission", "EXORemoteDomain", "EXOReportSubmissionPolicy", "EXOReportSubmissionRule", "EXOResourceConfiguration", "EXORoleAssignmentPolicy", "EXORoleGroup", "EXOSafeAttachmentPolicy", "EXOSafeAttachmentRule", "EXOSafeLinksPolicy", "EXOSafeLinksRule", "EXOSharingPolicy", "EXOTransportConfig", "EXOTransportRule") Is there anything else I could help you with? |
In my case, I've looked at the M365TenantConfig.ps1 and this is an example (I've edited the text after the ' which is causing the issue for sensitivity) Notes = "It's back - rest of the note....."; It seems in my case that the ' is acting as an escape from the text string, thus changing everything after it from being read correctly. Removing the ' manually from the .ps1 file fixes it, but not efficient as the PlannerTask .ps1 config report is 314,132 lines. This then interprets anything else as a command until a new quote block is reached, so if the term If is used in a note that is affected, it interprests the If as a powershell command |
@WillBuck99 I see, yes that's exactly the issue we're fixing. @Vorland If I do an export right now, it will also fail unfortunately when converting. This should be fixed on Thursday at the latest. The corresponding PR with the changes for the export was just merged, stay tuned for the latest release. |
@FabienTschanz thank you for the information! |
@WillBuck99 @Vorland Latest version of Microsoft365DSC 1.25.219.2 contains all the fixes. Please try again and let us know the result. |
Thank you @FabienTschanz. Tried it against an already pulled M365TenantConfig.ps1 but still got the same error after updating. Running a fresh report now just to be sure and I'll get back to you. Thank you for your help on this and thank you @Vorland for your input 👍 |
@WillBuck99 Already exported configurations are most likely invalid, so a fresh export and a report from that should solve it. Thank you so much for testing 😄 |
Hi @FabienTschanz, done a fresh PlannerTask export but still running into the same issue unfortunately: VERBOSE: Loading file 'C:\Temp\DSC\Planner\21-02-2025\\M365TenantConfig.ps1'
Error parsing configuration: At line:251 char:272
+ ... ``& file it in the yellow paper folder which says “reciepts” on it.";
+ ~~~~~~~~~~~~~~~~~
Unexpected token 'reciepts” on it."' in expression or statement.
At C:\Program Files\WindowsPowerShell\Modules\DSCParser\2.0.0.15\Modules\DSCParser.psm1:472 char:9
+ throw "$($errorPrefix)Error parsing configuration: $parseErro ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Error parsing c...n or statement.:String) [], RuntimeException
+ FullyQualifiedErrorId : Error parsing configuration: At line:251 char:272
+ ... ``& file it in the yellow paper folder which says “reciepts” on it.";
+ ~~~~~~~~~~~~~~~~~
Unexpected token 'reciepts” on it."' in expression or statement. PS C:\Users\GithubAutomation> Get-Module -Name "ReverseDSC"
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 2.0.0.27 ReverseDSC {Add-ConfigurationDataEntry, Add-ReverseDSCUserName, Convert-DSCStringParamToVariable, Get-ConfigurationDataContent...}
PS C:\Users\GithubAutomation> Get-Module -Name "Microsoft365DSC"
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 1.25.219.2 Microsoft365DSC {Add-M365DSCEvent, Add-M365DSCTelemetryEvent, Assert-M365DSCBlueprint, Assert-M365DSCIsNonInteractiveShell...} |
Ahh I see. Seems like those are some fancy double quotes you're using there ( |
Description of the issue
When I try to generate a report from the exported configuration of PlannerTasks, the report generation fails. I have looked at the generated ps1 file and the quotes are all over the place, all pointing towards the Notes section for each PlannerTask. It is registering any instances of characters or phrases which could be interpreted as a powershell command. I have tried filtering out those characters but issue remains.
Microsoft 365 DSC Version
V1.25.212.1
Which workloads are affected
Planner
The DSC configuration
Verbose logs showing the problem
Environment Information + PowerShell Version
The text was updated successfully, but these errors were encountered: