i need code for retrieving computers that are curently connected to a LAN, regardless if they are on or off. thx..

PS: is it also possible to get a list of users that are logged onto the computers at a particular time?