At least in Win7, Kristina's answer now seems to be either its memory of commands typed in the command lines, or the amount you can copy-paste.
To increase the scrollbar's memory, I did the following:
Go to properties as mentioned by Kristina
Go to the layout tab (that's the third one)
Modify the screen buffer size's height - 9999 is the maximum.
As mentioned by Joey in the comments to Kristina's answer, this will not work on things you've already done - only on things you do after making the change.
This answer was originally written when Kristina's was marked as accepted. Now that this is the accepted answer, I've edited my answer to avoid confusion.