< Back

Get-Key

Mon Jan 13, 2020 12:22 am

NAME Get-Key



SYNOPSIS

Gets a key from Certera





SYNTAX

Get-Key [-CerteraHost] <String> [-ApiKey] <String> [-KeyName] <String> [-Format] <String> [<CommonParameters>]





DESCRIPTION

A key can be in DER or PEM format.





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



-KeyName <String>



Required? true

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Format <String>



Required? true

Position? 4

Default value

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 the key in DER (base 64 encoded) or PEM format, or `$null`.





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



PS C:\\>$derKey = Get-Key -CerteraHost cert.mysite.com -ApiKey 8gpkuxy4a304 -KeyName some-key-name -Format der



Gets a key in DER format.









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



PS C:\\>$pemKey = Get-Key -CerteraHost cert.mysite.com -ApiKey 8gpkuxy4a304 -KeyName some-key-name -Format pem



Gets a key in PEM format.











RELATED LINKS