Cancel WMI query while it is in process? (because it hangs)
Posted on 2008-10-06
I'm doing some WMI queries on about 3000 machines. The problem is, some of those machines are in a hung state and when I do the query, the ASP script just locks up indefinitely. The only fix is restarting IIS. I am using win32_pingstatus before I do the queries to determine if the server is online. The servers in question respond saying they are online, but any following WMI queries cause the process to hang. What I need to know is a good way to detect when this has happened and continue to the next server in the loop.