First, you want to go to the UDF Forum here on this site and grab the code for WMIQuery and paste it in your script..

BTW, these may come in handy for you..

KiXtart FAQ & How to's

How to use UDFs

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's