...
Install the resource kit (requires Windows Server 2003, Windows XP)
From the Windows Start Menu, go to the "ProgramsIIS ResourcesSelfSSL" folder and select "SelfSSL".
Instructions will be listed in a command prompt. Type "selfssl" to run the program.
Type "y" to confirm overriding/installing the certificate on the given site.
Test that it worked by visiting https://localhost/
Full instructions with pictures available at http://www.visualwin.com/SelfSSL/
...