One obstacle to troubleshooting OpsMgr script errors or WMI query errors in Windows 2008, is to run the script or WMI query as a local system account in an interactive session so that you can see the output from the script.
To do this you will need to download PsTools, and use the psexec.exe file.
Command line (that is a Zero before the executable name)
psexec.exe –s –i 0 cmd.exe
psexec.exe –s –i 0 wbemtest.exe
You will get an Interactive Services dialog detection select ok to open it.
When running the cmd.exe you can verify who you are running it as by running the command whoami at the command prompt.