Today I had to dig into the register of a logged on user on a citrix environment. A nice task with 20+ concurrent users on a server to find the right SID to Username. After testen a few scripts and not want to use the Joeware sidtoname.exe I found a tool (User2SID) from Sepago that has a single executable (it requires .net framework 2.0) and let's you fill in the username and then finds the corresponding SID so you can start diggin into a users registry. You can find the tool here

Printscreen of the User2DIS from Sepago.