Before breaking my head, I thought about the community (maybe this would be useful in general), how could the following be translated to Powershell and/or .NET Core 2.0?
openssl pkcs12 -export -out p12file.p12 -inkey privatekeygenerateinsomeportal.pem -in clientcertificatedownloadedfromsomeportal.pem
I definitely don't know how to do it in .NET Core 2.0 (hints here) and I haven't yet found the appropriate Powershell spell either. It appears Windows facilities have not supported pem format, which makes this a tad difficult (hence .NET Core 2.0 to rescue?), like extracted from How to convert a PFX to .PEM format? Or how to generate a .PEM file? Using Native/Standard Windows tool
Windows do not support PEM format
Or there are some third party libraries, as demontrated here.
It also feels there can be subtleties in the .p12 format that cause interoperability problems (say, when the result would be used in various environments via Xamarin.Forms and whatnot).