Users.GetLoggedOnUsers
Module | Users |
---|---|
Method | |
Library | Core |
Action | List the active (currently logged-on) user sessions. |
Parameters | (None) |
Return values | For each session:
|
Example | @users = Users.GetLoggedOnUsers(); //get the home drive/path for each logged on user by running a command as each of them @home = FOREACH @user IN @users DO NativeServices.RunCommand(CommandLine:"CMD /c ECHO %HOMEDRIVE%%HOMEPATH%",AsUser:@user.Account); SELECT usr.*, cmd.Output AS Home FROM @user usr, @@last cmd; DONE; |
Platforms |
|
Notes |