get-scheduledtasks was being called for every scheduled task we intended to disable.
this was taking over 10 minutes on my resource constrained gold master, calling get-scheduledtasks once (and filtering for is not disabled), storing in a variable, and using that instead changed that portion of the code to be a 9 minute runtime to 1 minute runtime.
get-scheduledtasks was being called for every scheduled task we intended to disable.
this was taking over 10 minutes on my resource constrained gold master, calling get-scheduledtasks once (and filtering for is not disabled), storing in a variable, and using that instead changed that portion of the code to be a 9 minute runtime to 1 minute runtime.