You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a task has an assigned category greater than category6 the export will fail because the function GetTaskColorNameByCategory returns $null in this case. The exception is thrown in Get-DSCBlock because the array Categories contains $null
{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 <ScriptBlock>(Closure , FunctionContext )
at System.Management.Automation.ScriptBlock.InvokeWithPipeImpl(ScriptBlockClauseToInvoke clauseToInvoke, Boolean createLocalScope, Dictionary`2 functionsToDefine, List`1 variablesToDefine, ErrorHandlingBehavior errorHandlingBehavior, Object dollarUnder, Object input, Object scriptThis, Pipe outputPipe, InvocationInfo invocationInfo, Object[] args)
at System.Management.Automation.ScriptBlock.<>c__DisplayClass57_0.<InvokeWithPipe>b__0()
at System.Management.Automation.Runspaces.RunspaceBase.RunActionIfNoRunningPipelinesWithThreadCheck(Action action)
at System.Management.Automation.ScriptBlock.InvokeWithPipe(Boolean useLocalScope, ErrorHandlingBehavior errorHandlingBehavior, Object dollarUnder, Object input, Object scriptThis, Pipe outputPipe, InvocationInfo invocationInfo, Boolean propagateAllExceptionsToTop, List`1 variablesToDefine, Dictionary`2 functionsToDefine, Object[] args)
at System.Management.Automation.ScriptBlock.InvokeUsingCmdlet(Cmdlet contextCmdlet, Boolean useLocalScope, ErrorHandlingBehavior errorHandlingBehavior, Object dollarUnder, Object input, Object scriptThis, Object[] args)
at Microsoft.PowerShell.Commands.ForEachObjectCommand.ProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()
"Error during Export:"
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\ReverseDSC\2.0.0.28\ReverseDSC.Core.psm1: line 341
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\ReverseDSC\2.0.0.28\ReverseDSC.Core.psm1: line 320
at Get-DSCBlock, C:\Program Files\WindowsPowerShell\Modules\ReverseDSC\2.0.0.28\ReverseDSC.Core.psm1: line 157
at Get-M365DSCExportContentForResource, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.25.423.1\Modules\M365DSCUtil.psm1: line 3658
at Export-TargetResource, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.25.423.1\DSCResources\MSFT_PlannerTask\MSFT_PlannerTask.psm1: line 792
at Start-M365DSCConfigurationExtract, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.25.423.1\Modules\M365DSCReverse.psm1: line 682
at Export-M365DSCConfiguration, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.25.423.1\Modules\M365DSCUtil.psm1: line 1328
Environment Information + PowerShell Version
The text was updated successfully, but these errors were encountered:
Description of the issue
If a task has an assigned category greater than category6 the export will fail because the function
GetTaskColorNameByCategory
returns$null
in this case. The exception is thrown inGet-DSCBlock
because the arrayCategories
contains$null
A planner task can have up to 25 categories: https://learn.microsoft.com/en-us/graph/api/resources/plannercategorydescriptions?view=graph-rest-1.0
Microsoft 365 DSC Version
1.25.423.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: