Make sure your client has WMI installed, if not, download it and install it. Then test your code again.

May want to move the Get $xx
past the NEXT command as well.