Script-based workflows often use WMI queries to pull in the necessary data. The best practice is that WMI queries should not use be used in scripts.
WMI queries are known to create significant performance issues in Operations Manager, and if possible, should be avoided. If WMI queries cannot be avoided, ensure that they are optimized in their logic.