PowerCLI Reference

vSphere Auto Deploy Reference

Add-CustomCertificate

Synopsis

Add a custom certificate for an ESXi host

Syntax

[-HostId] String [-Cert] String [-Key] String [-Force] [CommonParameters]

Related Commands

Get-CustomCertificates
Remove-CustomCertificates

Detailed Description

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 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.

Parameters

Name Type Description Required? Pipeline Input Default Value
HostId String A MAC address or UUID, which identifies the ESXi host with which the custom certificate will be associated. true true (ByValue)
Cert String URI to the file containing the PEM-formatted certificate. true false
Key String URI to the file containing the PEM-formatted private key of the certificate. true false
Force SwitchParameter 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. false false

Return Type

Notes

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.


Copyright © 1998 - 2018 VMware, Inc. All rights reserved.