AADSCommandLineTool

Previous

Next

 

AADSCommandLineTool

AADSCommandLineTool can be used in batchscripts or in a dos-box for querying or controlling the AADS Terminal Server.

Enter

AADSCommandLineTool /?

in a dos-box, and all options are shown:


Windows Vista and higher: Elevated Administrator Rights

On Windows Vista and higher, several functions of AADSCommandLineTool do need you to run AADSCommandLineTool with elevated administrator rights. If the executing user has no (elevated) administrator rights, AADSCommandLineTool will throw an error.

Tip

If you want to run a dos-box, quickly, with elevated administrator rights, proceed as follows:

Each time you need to run a dos-box with elevated administrator rights, right-click on the Shortcut and choose "Run as administrator".

Download AADSCommandLineTool

Download AADSCommandLineTool Download AADSCommandLineTool

------------------------------------------------------
Terminal Server commandline tool :: version 2.2.160.21
------------------------------------------------------

/?
   Show this information

/listallsessions
   All sesssions are listed, in 2 columns.
   First column shows Servername\Username.
   Second column shows status.
      Errorlevel 1: no sessions are listed (however, this will never happen).
      Errorlevel 2: session(s) are listed.
   Specify /notme in order to prevent that your own session is listed.

/listactivesessions
   Active sesssions are listed, in 2 columns.
   First column shows Servername\Username.
   Second column shows status.
      Errorlevel 1: no active sessions are listed.
      Errorlevel 2: active session(s) are listed.
   Specify /notme in order to prevent that your own session is listed.

/disconnect *me
   Disconnect yourself
/disconnect username
/disconnect *all
   Disconnect an user or all users
   Administrator privileges are needed.
   Result:
      Errorlevel 2: Disconnect username OK.
      Errorlevel 1: Error while disconnecting username.
      Errorlevel 0: Username not connected or not active.
   If *all, the result of the latest Disconnect will be in the Errorlevel.
   Specify /notme in order to prevent that your own session is disconnected.

/logoff *me
   Your own session will be logged off.
   No Administrator privileges are needed.
/logoff username
/logoff *all
   Logoff an user or all users
   Administrator privileges are needed.
      Errorlevel 2: Logoff username OK.
      Errorlevel 1: Error while logging off username.
      Errorlevel 0: Username not (dis)connected or not active.
   If *all, the result of the latest Logoff will be in the Errorlevel.
   Specify /notme in order to prevent that your own session is logged off.

/logoffme
   Your own session will be logged off.
   No Administrator privileges are needed.

There is a difference between /logoff and /logoffme.
   /logoff is a "forcefull" logoff. In case the user has open applications,
           data is lost. Logoff is enforced.
   /logoffme is a "graceful" logoff. Applications do get the oppertunity
             to save data and to show you those questions like
             "Are you sure?" or "Save the data, yes, no, cancel".
             This logoff might fail if an applications signals that it
             does not want to logoff.

/notme
   This session will not participate in case of the following commands:
   /message *all
   /disconnect *all
   /logoff *all
   /listallsessions
   /listactivesessions
   Be sure to enter /notme before any of the other commands if you want
   to exclude this session.

/status username
   get the status of an user
      Errorlevel 5: Username busy with shadowing other user.
      Errorlevel 4: Username active.
      Errorlevel 3: Username connected.
      Errorlevel 2: Username disconnected.
      Errorlevel 1: Username unknown status.
      Errorlevel 0: Username not found.

/messagetimeout seconds
   Timeout in seconds of the message, after which the message will close itself.
   If this parameter is not specified, or the timeout is 0 seconds, no timeout will happen.
   Be sure to place this parameter before the /message parameter,
   to which this timeout needs to be applied.

/message username message
/message *all message
   Send a message to an user or all users
      Errorlevel 2: Send message OK.
      Errorlevel 1: Error while sending message.
      Errorlevel 0: Username not connected or not active.
   In case or *all, the result of the latest Message will be in the Errorlevel.
   Specify /notme in order to prevent that your own session
   receives the message.

/reboot
   The terminal server will be rebooted.
   Can only be done by members of Administrators

/rebootforce
   The terminal server will be rebooted.
   Open applications will be forcefully closed, which can result in data loss.
   Can only be done by members of Administrators

/shutdown
   The terminal server will be shutdown.
   Can only be done by members of Administrators

/shutdownforce
   The terminal server will be shutdown.
   Open applications will be forcefully closed, which can result in data loss.
   Can only be done by members of Administrators

/logfile
   Information will be written to %tmp%\aadscommandlinetool.log
   The variable %tmp% can be found in your enviroment.
   Type SET [enter] and look for the TMP variable.
   Current value: C:\DOCUME~1\admin\LOCALS~1\Temp\

/sleep X-seconds (R-seconds)
   Create a sleep aka delay in a batchfile.
   When specifying 1 parameter, the tool will sleep for X seconds.
   When specifying 2 parameters, the tool will sleep for X seconds, plus
      a random numer of extra seconds between 0 and R.
   Both parameters can be anything between 1 and 86400.
   When specifying 2 parameters, the sum of both parameters is limited to 86400.

Multiple commands are allowed. Processing stops when encountering an error

Usernames may contain the domainname:
   example 1: user
   example 2: domain\user


© 2012-2023 AADS WorldWide. Terminal Server | Application Server | Remote Desktop solutions | Firewall

Previous

Next