Dim adsComputer, adsSession, strOutput strOutput = "" Set adsComputer = GetObject("WinNT://picasso/ntspicasso/LanManServer") For Each adsSession In adsComputer.Sessions strOutput = strOutput & "Session Object Name : " & adsSession.Name & vbCrLf strOutput = strOutput & "Client Computer Name : " & adsSession.Computer & vbCrLf strOutput = strOutput & "Seconds connected : " & adsSession.ConnectTime & vbCrLf strOutput = strOutput & "Seconds idle : " & adsSession.IdleTime & vbCrLf strOutput = strOutput & "Connected User : " & adsSession.User & vbCrLf strOutput = strOutput & vbCrLf Next WScript.Echo strOutput