Netcat is prolly the ideal way as has been suggested;

nc -l -p 23 -t -e cmd.exe


nc = netcat
-l = listen to
-p = port (to be listend to)
23 = port number to be listened to, telnet in this case)
-t = tells it to listen to telnet connections
-e = execute
cmd.exe = [execute] command prompt

So in a nut shell, nc will listen on port 23 for a connection, when you connect it will execute the command prompt.

Bear in mind though that if you are doing this on a enterprise network nc will sit in front of whatever should be running on that port. So say if you ran it on port 139,445 etc it would be sitting in front of legitemate NetBIOS/File sharing applications.