Closed ChristelVDH closed 3 years ago
I have ran the script again in debug mode in VSCode and then I did not get the $null error on these lines and neither were the schedules empty or null. I'll keep an eye out next time I run it in production again.
@chriskenis are you planning to submit a pull request for the issue on line 5898? I thought you might want "credit" for squashing that bug.
line 5898 adds the wrong values to $listarray--> $filesarray instead of $processarray lines 4096 and 4075 return an error when schedule object is empty --> propose check on ($null -eq $AgentConfig.Schedule) and ($null -eq $AgentConfig.EvaluationSchedule) to prevent $null validation error from the Convert-CMSchedule cmdlet