I need a script to shrink all the log files on my database server

Ah, I can help with that. The script below will generate a script (scriptception!). So make sure to press ctrl-t before executing the script, so you can get the results in text format. Then, you can copy and paste the result text into a new window and run the script. It will shrink and then truncate all the log files, freeing up space.

Please note that shrinking log files is only useful if you are in a pinch or have run an extraordinary script. Usually, your log files will be around the correct size and shrinking them is only a temporary solution. Expanding the size of the log file and/or buying more disk space is a more lasting solution.