New-RASCertificate
Last updated
Last updated
New-RASCertificate
Creates a Certificate by Importing a Certificate/Pfx file, generating a self-signed certificate or generating a certificate request.
New-RASCertificate []** (string) [[-] (uint)] - (string) - (string) - (string) [ (string)] [ (string)] [ (string)] [ (string)] [ (bool)] [ (string)] [- {KeySize1024 | KeySize2048 | KeySize4096 | KeySize3072 | KeySize521 | KeySizeUnknown}] [ (string)] [ (string)] [- {None | Gateway | HALB}] [()]
New-RASCertificate []** (string) [[-] (uint)] - (string) - (string) [ (string)] [ (string)] [ (string)] [ (string)] [ (bool)] [ (uint)] [ (string)] [- {KeySize1024 | KeySize2048 | KeySize4096 | KeySize3072 | KeySize521 | KeySizeUnknown}] [ (string)] [ (string)] [- {None | Gateway | HALB}] [()]
New-RASCertificate []** (string) [[-] (uint)] - (string) - (string) [ (string)] [ (bool)] [- {None | Gateway | HALB}] [()]
New-RASCertificate []** (string) [[-] (uint)] - (string) [ (string)] [ (bool)] [ (SecureString)] [- {None | Gateway | HALB}] [()]
New-RASCertificate []** (string) [[-] (uint)] - (string) - (string) - (SwitchParameter) [ (string)] [ (string)] [ (string)] [ (string)] [ (bool)] [ (string)] [- {KeySize1024 | KeySize2048 | KeySize4096 | KeySize3072 | KeySize521 | KeySizeUnknown}] [ (string)] [ (string)] [- {None | Gateway | HALB}] [()]
By default, one is guided to create a Self-Signed Certificate.
A certificate is imported by either specifying a CertificateFile and PrivateKeyFile, or specifying a PfxFile with an optional PfxPassword.
A certificate request can be created by specifying a RequestFile path to output the request to.
The name of the target Certificate.
Site ID in which to add the Certificate.
A user-defined Certificate description.
Certificate file name in pfx format.
The password of the pfx file specified in the PfxFile parameter.
Private key file name.
Certificate file name.
A set of usages to assign. To form a set of usages 'OR' individual usage enum IDs.
Possible values: None, Gateway, HALB
Whether to enable or disable the certificate being created.
Possible values: KeySize1024, KeySize2048, KeySize4096, KeySize3072, KeySize521, KeySizeUnknown
The Country Code for the certificate to be generated.
By default, the country code from the PowerShell region information is used.
Specifies the length of validity of the certificate being generated.
The Full State or Province for the certificate to be generated.
The City for the certificate to be generated.
The Organisation for the certificate to be generated.
The Organisation Unit for the certificate to be generated.
The Email for the certificate to be generated.
The Common Name for the certificate to be generated.
The Alternate Names for the certificate to be generated.
eg. IP:1.2.3.4,DNS:example.com
Request file name to output Request Certificate to.
Let's Encrypt SwitchParameter
(CommonParameters)
-none-
**---------- EXAMPLE 1 ----------
New-RASCertificate -Name "ImportedCert" -SiteId 1 -Description "Certificate" -Usage Gateway -Enabled $true -PrivateKeyFile "C:\key.pem" -CertificateFile "C:\cert.pem"
Imports a certificate from the files key.pem and cert.pem to a certificate object with Name "ImportedCert" on Site 1. **---------- EXAMPLE 2 ----------
New-RASCertificate -Name "ImportedPfx" -SiteId 1 -Description "Certificate" -Usage Gateway -Enabled $true -PfxFile "C:\cert.pfx" -PfxPassword $pfxPassword
Imports a certificate from a pfx file cert.pfx to a certificate object with Name "ImportedPfx" on Site 1. **---------- EXAMPLE 3 ----------
New-RASCertificate -Name "SelfSignedCert" -SiteId 1 -Description "Certificate" -Usage Gateway -Enabled $true -Email "test@parallels.com" -CommonName "TestCert" -AlternateNames "DNS:*.example.com,IP:1.2.3.4,IP:::1"
Generates a self-signed certificate with Name "SelfSignedCert" on Site 1. **---------- EXAMPLE 4 ----------
New-RASCertificate -Name "CertRequest" -SiteId 1 -Description "Certificate" -Usage Gateway -Enabled $true -Email "test@parallels.com" -CommonName "TestCert" -RequestFile "C:\req.crt" -AlternateNames "DNS:example.com,IP:1.2.3.4,IP:::1"
Generates a certificate request with Name "CertRequest" on Site 1, and saves the request to req.crt
() The Key Size for the certificate to be generated.