There isn't an EASY way, but the two that come to mind are:
First, For a web certificate, download the IIS6 Resource Kit tools, and use the SelfSSL.exe tool, choose
*.example.com as the name and it will install to the certification database. You should be able to pull out the public/private key and use it however you want.
Second, is a much much harder way, Download the latest version of OpenSSL, and you should be able to generate it through that - I have only ever used it for an entire CA setup and never for a single certificate.
I found instructions for Linux, and it should be similar for Windows. Link here, with a few modifications. If you want help with what is needed for a full CA and/or can't find what you need, let me know and I'll try to find it out for you.