New-SelfSignedCertificate on Win2012 r2 has less parameters
<p>I'm trying to create a self signed certificate with specific encryption parameter values.</p>

<p>On a Win Server 2012 r2 standard running PowerShell 5.0, when I attempt to use </p>

<pre><code>New-SelfSignedCertificate
</code></pre>

<p>I receive an error:</p>

<blockquote>
  <p>New-SelfSignedCertificate : A parameter cannot be found that matches parameter name 'Subject'.</p>
</blockquote>

<p>when I attempt to use the <code>-Subject</code> parameter, which in addition to other parameters allowed on my laptop, does not appear in the intellisense.</p>

<p>However on my laptop (Win 10 and PowerShell 5.0) I'm allowed to use these parameters, and I create a self-signed certificate by using the following code</p>

<pre><code>#create a Certificate
# OID for document encryption
    $Oid = New-Object System.Security.Cryptography.Oid "1.3.6.1.4.1.311.80.1"
    $oidCollection = New-Object System.Security.Cryptography.OidCollection
    $oidCollection.Add($oid) &gt; $Null
# Create enhanced key usage extension that allows document encryption
$Ext = New-Object System.Security.Cryptography.X509Certificates.X509EnhancedKeyUsageExtension $oidCollection, $true 

$myCert = New-SelfSignedCertificate -Subject 'CN=myservernameasubject' -CertStoreLocation "Cert:\LocalMachine\My" -KeySpec KeyExchange -KeyUsage KeyEncipherment, DataEncipherment -Extension $Ext
</code></pre>