New-VIMachineCertificateSigningRequest

This cmdlet generates a new Certificate Signing Request (CSR) for a vCenter Server system or an ESXi host.By default, this cmdlet generates a CSR for a vCenter Server system. If you want to generate a CSR for an ESXi host, you can use the VMHost parameter.This cmdlet requires a connection to a vCenter Server system through the Connect-VIServer cmdlet.

Syntax

-Country  <String>
-Email  <String>
-Locality  <String>
-Organization  <String>
-OrganizationUnit  <String>
-StateOrProvince  <String>
[-CommonName  <String>]
[-KeySize  <UInt32>]
[-Server  <VIServer>]
[-SubjectAltName  <String[]>]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Country
String named Provides input for the country field.
required
Email
String named Provides input for the email field.
required
Locality
String named Provides input for the locality field.
required
Organization
String named Provides input for the organization field.
required
OrganizationUnit
String named Provides input for the organization unit field.
required
StateOrProvince
String named Provides input for the state or province field.
optional
CommonName
String named Specifies a common name for the certificate. If not used, the PNID of the vCenter Server system or the FQDN of the ESXi host is the common name.
optional
KeySize
UInt32 named Specifies the size of the certificate private key. If not used, the default is 2048 bits.
optional
Server
VIServer named
optional
SubjectAltName
String[] named Specifies domain names and IP addresses that you want to secure with the certificate.

-CommonName  <String>
-Country  <String>
-Locality  <String>
-Organization  <String>
-OrganizationUnit  <String>
-StateOrProvince  <String>
-VMHost  <VMHost>
[-Server  <VIServer>]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
CommonName
String named Specifies a common name for the certificate. If not used, the PNID of the vCenter Server system or the FQDN of the ESXi host is the common name.
required
Country
String named Provides input for the country field.
required
Locality
String named Provides input for the locality field.
required
Organization
String named Provides input for the organization field.
required
OrganizationUnit
String named Provides input for the organization unit field.
required
StateOrProvince
String named Provides input for the state or province field.
required
VMHost
VMHost named
  • pipeline
  • Specifies an ESXi host for which to generate a CSR.
    optional
    Server
    VIServer named

    -VMHost  <VMHost>
    [-Server  <VIServer>]
    [CommonParameters]

    Parameters

    Required Parameter Name Type Position Features Description
    required
    VMHost
    VMHost named
  • pipeline
  • Specifies an ESXi host for which to generate a CSR.
    optional
    Server
    VIServer named

    Output

    System.String

    Examples


    Example 1

    $csr = New-VIMachineCertificateSigningRequest `
    -Country 'US' `
    -Email 'example@dummy.com' `
    -Locality 'Example Town' `
    -Organization 'Example organization' `
    -OrganizationUnit 'Example organization unit' `
    -StateOrProvince 'Example state'

    Create a certificate signing request for the vCenter Server system and saves it in the csr variable.

    Example 2

    $csr = New-VIMachineCertificateSigningRequest 'MyHost'

    Create a certificate signing request for the 'MyHost' ESXi host and saves it in the csr variable.

    Related Commands

    Feedback

    Was this page helpful?