Reading the original port I think what he wants is to give the script a machine name and have the script return who is logged onto the specific system.

I once did something like this with ntname.exe. It works by giving it a username and it tells you on what system this user is logged.
http://www.google.nl/search?hl=nl&q=ntname.exe&meta=
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.