The version of New-SelfSignedCertificate on PS 4 is pretty simple.
However, Powershell v5 has options that you will need to create certain keys.
In particular, the Keyusage parameter, which takes
-- CertSign -- CRLSign -- DataEncipherment -- DecipherOnly -- DigitalSiganture -- EncipherOnly -- KeyAgreement -- KeyEncipherment -- None (default) -- NonRepudiation
and a KeyUsageProperty taking
-- All -- Decrypt -- KeyAgreement -- None (default) -- Sign
Are you specially tied to v4? If you can upgrade to v5, you can achieve what you need.
source share