Skip to content
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

PLANNER : Issues while generating report from workload export (many warnings casted by ConvertTo-DSCObject) #2822

Closed
MarcelHeek opened this issue Jan 20, 2023 · 0 comments · Fixed by #2857 or #2864
Labels
Bug Something isn't working Planner V1.23.118.1 Version 1.23.118.1

Comments

@MarcelHeek
Copy link

Details of the scenario you tried and the problem that is occurring

Consider the following. I ran a full PLANNER workload export and subsequently I want to generate a report in HTML and JSON format. In both instances a large amount of warnings were shown.

The reason for the many errors is the incorrect handling of a single quote within a Uri property as I will show below


WARNING: ConvertTo-DSCObject: "s" (line 165905): Unexpected token 's' in expression or statement.
WARNING: ConvertTo-DSCObject: "" (line 165905): There is an incomplete property assignment block in the instance definition.

Sourcefile:

       PlannerTask GUID
        {
            ApplicationId         = $ConfigurationData.NonNodeData.ApplicationId;
            AssignedUsers         = @("ArrayOfUsers");
            Attachments           = @(MSFT_PlannerTaskAttachment
            {
                Uri = 'https%3A//<replaced>%2Esharepoint%2Ecom/sites/<sitename>/Gedeelde documenten/<foldername>/Overzicht Generieke Projectrisico's per Object%2Epdf?web=1'
                Alias = 'Overzicht Generieke Projectrisico''s per Object.pdf'
                Type = 'Pdf'
            }

Reason : the Uri contains a 's which teminates the content of the Uri early and the DSCObject cannot be created. Even worse....the complete remaining bit of the PS1 file cannot be processed properly

Verbose logs showing the problem

The first top x lines casted as WARNING

WARNING: ConvertTo-DSCObject: "s" (line 165905): Unexpected token 's' in expression or statement.
WARNING: ConvertTo-DSCObject: "" (line 165905): There is an incomplete property assignment block in the instance definition.
WARNING: ConvertTo-DSCObject: "&" (line 165912): The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double quotation marks ("&") to pass it as part of a string.
WARNING: ConvertTo-DSCObject: "graag" (line 166088): Unexpected token 'graag' in expression or statement.
WARNING: ConvertTo-DSCObject: "graag" (line 166089): Unexpected token 'graag' in expression or statement.
WARNING: ConvertTo-DSCObject: "graag" (line 166090): Unexpected token 'graag' in expression or statement.
WARNING: ConvertTo-DSCObject: "," (line 166653): Missing argument in parameter list.
WARNING: ConvertTo-DSCObject: "&" (line 166855): The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double quotation marks ("&") to pass it as part of a string.
WARNING: ConvertTo-DSCObject: "kan" (line 167449): Unexpected token 'kan' in expression or statement.
WARNING: ConvertTo-DSCObject: "kan" (line 167450): Unexpected token 'kan' in expression or statement.
WARNING: ConvertTo-DSCObject: "kan" (line 167451): Unexpected token 'kan' in expression or statement.
WARNING: ConvertTo-DSCObject: "kan" (line 167452): Unexpected token 'kan' in expression or statement.
WARNING: ConvertTo-DSCObject: "," (line 168175): Missing argument in parameter list.
WARNING: ConvertTo-DSCObject: "_VFfqBEFZ0muhWJ8G9-21pYAFQHf";
            Priority              = 1;
            StartDateTime         = "11/11/2022" (line 169429): Unexpected token '_VFfqBFZmuhW8G-21pYAFQHf";
            Priority              = 1;
            StartDateTime         = "11/11/2022' in expression or statement.
WARNING: ConvertTo-DSCObject: "&" (line 169434): The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double quotation marks ("&") to pass it as part of a string.
WARNING: ConvertTo-DSCObject: "_VFfqBEF0muWJ8G-21YAFQHf";
            Priority              = 5;
            StartDateTime         = "11/7/2022" (line 169606): Unexpected token '_VFfEFZ0uhW8G9-2pYAQHf";
            Priority              = 5;
            StartDateTime         = "11/7/2022' in expression or statement.
WARNING: ConvertTo-DSCObject: "&" (line 169766): The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double quotation marks ("&") to pass it as part of a string.
WARNING: ConvertTo-DSCObject: "&" (line 170510): The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double quotation marks ("&") to pass it as part of a string.
WARNING: ConvertTo-DSCObject: "}" (line 171766): Missing closing ')' in subexpression.
WARNING: ConvertTo-DSCObject: "{" (line 16): Missing closing '}' in statement block or type definition.
WARNING: ConvertTo-DSCObject: "{" (line 7): Missing closing '}' in statement block or type definition.
WARNING: ConvertTo-DSCObject: "}" (line 171816): Unexpected token '}' in expression or statement.
WARNING: ConvertTo-DSCObject: "&" (line 174122): The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double quotation marks ("&") to pass it as part of a string.
WARNING: ConvertTo-DSCObject: "&" (line 174122): The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double quotation marks ("&") to pass it as part of a string.
WARNING: ConvertTo-DSCObject: "&" (line 174122): The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double quotation marks ("&") to pass it as part of a string.
WARNING: ConvertTo-DSCObject: "@Sebastiaan:" (line 174203): Variable reference is not valid. ':' was not followed by a valid variable name character. Consider using ${} to delimit the name.

Suggested solution to the issue

Could you please fix the single quote issue that are possible in the Uri, but breaks the export routines

The DSC configuration that is used to reproduce the issue (as detailed as possible)

New-M365DSCReportFromConfiguration -Type 'json' -ConfigurationPath ".\$($ReportDir)\M365TenantConfig.ps1" -OutputPath "$OutputPath\$Getdate-$TenantID.json"

The operating system the target node is running

OsName               : Microsoft Windows Server 2022 Datacenter
OsOperatingSystemSKU : DatacenterServerEdition
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 20348.1.amd64fre.fe_release.210507-1500
OsLanguage           : en-US
OsMuiLanguages       : {en-US}

Version of the DSC module that was used ('dev' if using current dev branch)

1.23.118.1

@andikrueger andikrueger added Planner V1.23.118.1 Version 1.23.118.1 Bug Something isn't working labels Jan 26, 2023
NikCharlebois added a commit to NikCharlebois/Microsoft365DSC that referenced this issue Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Planner V1.23.118.1 Version 1.23.118.1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants