I have just tried the SQL version of the script and I get an error on line 68 unkown command WMIQuery