Skip to content

PlannerTask: Null-valued expression exception in Convert-M365DSCPlannerTaskAssignmentToCIMArray #6004

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

Closed
jaebischer opened this issue Apr 11, 2025 · 0 comments · Fixed by #6006 or #6024

Comments

@jaebischer
Copy link

Description of the issue

The property Alias in a planner attachment can be null. In this case the Convert-M365DSCPlannerTaskAssignmentToCIMArray will fail on line 886 in MSFT_PlannerTask.psm1:
$attachment.Alias.Replace("'", "''")

Microsoft 365 DSC Version

1.25.402.1

Which workloads are affected

Planner

The DSC configuration

Verbose logs showing the problem

{InvalidOperation}
System.Management.Automation.RuntimeException: You cannot call a method on a null-valued expression.
    at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
    at Convert-M365DSCPlannerTaskAssignmentToCIMArray(Closure , FunctionContext )
    at System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
    at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
    at System.Management.Automation.CommandProcessorBase.Complete()
"Error during Export:"
at Convert-M365DSCPlannerTaskAssignmentToCIMArray, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.25.402.1\DSCResources\MSFT_PlannerTask\MSFT_PlannerTask.psm1: line 886
at Export-TargetResource, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.25.402.1\DSCResources\MSFT_PlannerTask\MSFT_PlannerTask.psm1: line 763
at Start-M365DSCConfigurationExtract, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.25.402.1\Modules\M365DSCReverse.psm1: line 682
at Export-M365DSCConfiguration, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.25.402.1\Modules\M365DSCUtil.psm1: line 1495

Environment Information + PowerShell Version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant