< Back

Get-Cert

Mon Jan 13, 2020 12:22 am

NAME Get-Cert



SYNOPSIS

Gets a certificate from Certera





SYNTAX

Get-Cert [-CerteraHost] <String> [-ApiKey] <String> [-CertName] <String> [[-PfxPassword] <String>] [-Staging]

[<CommonParameters>]





DESCRIPTION

A certificate can be in PFX or PEM format. When PfxPassword is specified, the format is PFX. Otherwise, a PEM

certificate is returned.

PFX certificates contain an exportable private key. PEM certificates do not contain the private key.





PARAMETERS

-CerteraHost <String>



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ApiKey <String>



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-CertName <String>



Required? true

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-PfxPassword <String>



Required? false

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Staging [<SwitchParameter>]



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

string containing full certificate chain in PFX (base 64) protected with the given password or PEM format or

`$null`.





-------------------------- EXAMPLE 1 --------------------------



PS C:\\>$pfxCert = Get-Cert -CerteraHost cert.mysite.com -ApiKey 8gpkuxy4a304 -CertName some-cert-name -PfxPassword

"!234SECRETbc123" -Staging



Gets a staging certificate in PFX format secured with given password.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>$pemCert = Get-Cert -CerteraHost cert.mysite.com -ApiKey 8gpkuxy4a304 -CertName some-cert-name -Staging



Gets a staging certificate PEM format.











RELATED LINKS