in reply to Loging into a series of windows machines
That needs some work and at the moment; I don't have the time to debug it. Maybe one of the others might.
I would suggest taking a look at our tutorials as they are very good for beginners and take a look at the Code Caverns. Click the Code link on the above left. Take a look at the NT Admin scripts and you will see a couple examples that deal with computers and checking things. I even have an old one dealing with disk space checks. You might see something you can use.
Oh and welcome! :)