I appreciate the effort seal but that does help me. As I said, I am NOT having a problem with using WMI to see if a person is logged on. I am having a problem with the shutdown command. The value of $c becomes 53, help me get it to 0.