Add-CustomCertificate Command | Vmware PowerCLI Reference


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.


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


Required Parameter Name Type Position Features Description
Certificate String named
HostId String named
  • pipeline
A MAC address or UUID, which identifies the ESXi host with which the custom certificate will be associated.
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.



Example 1

C:\PS&#62 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


Add a custom certificate for an ESXi host


Get all custom host certificates.

Remove custom host certificate.