Script Download: DetermineTerminalSession.ziphttp://gallery.technet.microsoft.com/scriptcenter/Determines-the-Terminal-a0a454a4
Because there are many terminal sessions in the Terminal server, users want to determine RDP Session logon type. Although there are some possible scripts in Windows server 2003, but still not well supported by Windows server 2008 and Windows server 2008 R2.
You can find more All-In-One Script Framework script samples at http://aka.ms/onescriptingallery