Another odd bug from this weeks troubleshooting, in this case, we use a couple of pre-caching task sequences before running our final in-place upgrade task sequence.
We found that a completed caching task sequence somehow got stuck in the queue preventing any further deployments. This was visible in the Execmgr.log with the cryptic error:
“Found an active task sequence in the completed queue. Cannot proceed while another Task Sequence is in progress”
Previously the only way we could find to solve this was by deleting all deployments to this machine and re-create.
Luckily my colleague discovered a nifty PowerShell command to query the queue for a different problem from this blog:https://itinlegal.wordpress.com/2017/09/28/task-sequence-fails-to-start-0x80041032/
From a PowerShell Prompt run
gwmi -namespace root\CCM\softmgmtagent -query “select * from ccm_tsexecutionrequest”
This returns nothing if there are no active task sequences; if you find a stuck task sequence clear it out with:
gwmi -namespace root\CCM\softmgmtagent -query “select * from ccm_tsexecutionrequest” | remove-wmiobject