# GETUSN
> [HTML Version](getusn_sbr.htm)
_Updated July 2013_
**xcall GETUSN, usrnam\$ \{, machine\$, ate'user\$, ate'machine\$, compname\$, wts'session\}**
GETUSN returns the current user login name along with, optionally, the other variables listed in the syntax line and the table below. See OPTIONS=[EFFUSR](effusr.htm.md) and [CONDEV](condevsbr.htm.md) for related information.
**Parameters**
| **Parameter** | **Type** | **I/O** | **Notes** |
|------|------|------|------|
| usrnam\$ | [String](string.htm.md) | in/out | The current user login name. If the user name has been overridden (via MX\_SETUSRNAM or automatically by an ATSD server when accepting an ATE connection), then _usrnam\$_ will return the over-ridden name. To force it to return the original name (either the server login name or effective user name), set _usrnam\$_ to "\!" before calling GETUSN. |
| machine\$ | [String](string.htm.md) | out | The console device name. |
| ate'usrnam\$ | [String](string.htm.md) | out | The login name of the ATE client. |
| ate'machine\$ | [String](string.htm.md) | out | The machine name of the ATE client. |
| compname\$ | [String](string.htm.md) | out | The Windows computer name of the client machine. In many cases this will be the same as the _machine\$_ parameter, except it will be just the computer name without any suffixes. It is mainly useful in cases where you are using the -awts command line switch (or OPTIONS=NTTS) where the _machine\$_ parameter may have little relation to the actual client computer name. |
| wts'session | [Num](num.htm.md) | out | The Windows Terminal Services client session ID, if applicable. Zero indicates the client is not running a WTS connection. Note, however, that internally WTS numbers client sessions from zero, so if you are using the value to reference registry or other information tied to the session #, subtract one first. |