Thank you both... it turns out this was a Linux machine. I'm not sure why it worked sometimes and other times it didn't, but I have added some code to stop it from trying to get certain information from a machine if it's not Windows. Thanks again for your help \:\)