Just make -Certificate take a parameter of type [object], and bind it according to the following rules:
If it's already an X509Certificate2 object, just use it directly.
If it's a string, check to see if it matches either a valid file path, or a certificate thumbprint hex string, and load up the certificate object accordingly.
-CertificateThumbprint will become deprecated, and will produce warnings until it is later removed.
Just make
-Certificate
take a parameter of type[object]
, and bind it according to the following rules:-CertificateThumbprint
will become deprecated, and will produce warnings until it is later removed.