Little-known command line utility: clip
Windows Vista includes a tiny command line utility called clip.
All it does is paste its stdin onto the clipboard.
dir | clip
echo hey | clip
For the opposite direction, I use a little perl script:
use Win32::Clipboard;
print Win32::Clipboard::GetText();