local loConnection, loSessions, loSession lcServer = "<Your Server>" loConnection = GetObject("WinNT://" + lcServer + "/LanmanServer") loSessions = loConnection.Sessions() create cursor C_Sessions ; ( ; PK I autoinc , ; Computer C(64) , ; ConnectedTime I , ; IdleTime I , ; Name C(64) , ; User C(64) ; ) For Each loSession in loSessions wait window 'Adding: ' + loSession.Name nowait with loSession try insert into C_Sessions ; ( ; Computer , ; ConnectedTime , ; IdleTime , ; Name , ; User ; ) ; values ; ( ; .Computer , ; .ConnectTime , ; .IdleTime , ; .Name , ; .User ; ) catch endtry endwith endfor wait window 'Creating indexes...' nowait index on PK tag PK index on Computer tag Computer index on Name tag Name index on User tag User wait clear