CustomCertificate Category | Vmware PowerCLI Reference

Custom Certificate Category

Cmdlets are usually implemented around resource operations. The four basic operations are CREATE, READ, UPDATE and DELETE. This set of operations is known as CRUD. Most of the cmdlets support CRUD which are respectively cmdlets that start with the New/Get/Set/Remove cmdlet verbs but they also may have additional operations

Step 1: Retrieve a object by running a Get command

You can READ objects by using Get-CustomCertificates cmdlet. See example below:

# Retreive all custom host certificates.

Get-CustomCertificates

Step 2 : Run commands from the CRUD group

You can UPDATE objects by using Add-CustomCertificate cmdlet. See example below:

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

Add-CustomCertificate --HostId "00:A0:C9:14:C8:29" --Cert "file:///c:/temp/custom-cert.pem" --Key "file:///c:/temp/custom-key.pem"
You can REMOVE objects by using Remove-CustomCertificates cmdlet. See example below:

# Remove the custom certificates associated with hosts with the given MAC addresses.

Remove-CustomCertificates -HostIds "00:A0:C9:14:C8:29","00:A0:C9:14:C8:30"