You’d think this is easily done in WSL2 with the following command:
xclip -i file.txt -selection clipboard
The method that works in practice is to pass it over to the native windows utility for manipulating the clipboard:
cat file.txt | clip.exe