You recognize the Situation loged on to a Terminal server to install Programms and disabled users to logon to the Terminal server till you finished and logged of before enabling users o logon to the Terminalserver again. Then use the following command to enable it in the registry.
psexec \\machinename change logon /enable
This will write value 0 in HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\WinStationDisabled