Add-CustomCertificate

Add a custom certificate and associate it with an ESXi host. Once the certificate is added, it will be sent to the host the next time it boots. The Get-CustomCertificates cmdlet can be used to retrieve information about uploaded custom host certificates. You must have the "AutoDeploy.Rule.Create" privilege on the root folder of vCenter Server to use this cmdlet.

Syntax

-Certificate  <String>
-HostId  <String>
-Key  <String>
[-Force]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Certificate
String named
required
HostId
String named
  • pipeline
  • A MAC address or UUID, which identifies the ESXi host with which the custom certificate will be associated.
    required
    Key
    String named URI to the file containing the PEM-formatted private key of the certificate.
    optional
    Force
    SwitchParameter named Whether to replace the currently associated certificate, if such exists. If not set, an attempt to replace the certificate with which a host has already booted, will result in an exception being thrown. If the force option is given, the host with the given ID will receive the new certificate the next time it is rebooted.

    Output

    Examples


    Example 1

    C:\PS> Add-CustomCertificate --HostId "00:A0:C9:14:C8:29" --Cert "file:///c:/temp/custom-cert.pem" --Key "file:///c:/temp/custom-key.pem"

    Associate the certificate and private key in the given files with the MAC address. When a host with that MAC address boots up, the custom certificate will be sent to it.

    Related Commands

    Feedback

    Was this page helpful?