The IIS 6.0 Resource Kit version 1.0 was released 5/30/2003. It contains a utility called SelfSSL.exe for instantly creating and installing a self-signed testing certificate into IIS. The resource kit is freely downloadable from the Microsoft website. Although the tool is intended for IIS 6.0, it works just as well on IIS 5.1. It is so simple to use that no instructions are required beyond the pointer to the download.
If you want hand-holding through these steps, read these instructions with screenshots by Jonathan Maltz.
Microsoft has also provided Microsoft Internet Information Services 6.0 Resource Kit the book for download via their website in whole or chapter.