Use the attached PowershellScript. Make modifications as needed before running it.
You can generate a self-signed certificate online here:
This will generate a two files – a certificate and a key.
If you are using IIS server you need to convert these to .pfx. For this you can use the SSL Converter here: