I did something similar. Created a small function that tests if $DEBUG is true and then prints out the comments. So, that is getting me some more details, but nothing jumping out as a problem, except for some reason, when I run the $objSC.Run, I always get back "invalid number of parameters" even if it works. I'm trying to test if auto updates is enabled. I found some vbscript that starts with:
 Code:
Set objAutoUpdate = CreateObject("Microsoft.Update.AutoUpdate")
Set objSettings = objAutoUpdate.Settings
I'm not really sure how to put that in kix. Any suggestions?