If you're on Windows then you get creating a certificate and adding it to the cert store out of the box with PowerShell[0].
[0] https://docs.microsoft.com/en-us/powershell/module/pkiclient...
[0] https://docs.microsoft.com/en-us/powershell/module/pkiclient...