Quantcast
Channel: Public Key Infrastructure PowerShell module
Viewing all articles
Browse latest Browse all 729

Updated Wiki: Receive-Certificate

$
0
0

Name

Receive-Certificate

SYNOPSIS

Receives already issued certificate from a Certification Authority database.

SYNTAX

Receive-Certificate [-RequestRow] <Object> [[-Path] <DirectoryInfo>] [-Force] [<CommonParameters>]

DESCRIPTION

Receives already issued certificate from a Certification Authority database. This command can be used to retrieve an issued pending certificate request after it's approval.

Although, the command saves received certificates in the specified folder, the command returns corresponding X509Certificate2 objects, so you can use these certificates for custom tasks.

PARAMETERS

-RequestRow<Object>

Specifies a RequestRow object. This object can be retrieved by using either Get-IssuedRequest or Get-RevokedRequest. The request object already contains information about target CA server and request ID in the CA database.

Note: this command retrieves only issued certificates, therefore you should not use Get-PendingRequest or Get-FailedRequest commands.

Required?True
Position?0
Default value 
Accept pipeline input??true (ByValue, ByPropertyName)
Accept wildcard characters?False

-Path<DirectoryInfo>

Specifies the path to a directory where to store the issued certificate. This parameter accepts only directory paths. If the directory doesn't exist, the command attempts to create it.

Files names are generated in the following form: RequestID_<RequestID>.cer

where '<RequestID>' is the request ID in the CA database.

Note: you should avoid RequestRow piping from different CA servers, because 2 CA servers may have matching RequestID values. Instead, use this command against each CA server separately.

Required?False
Position?1
Default value 
Accept pipeline input??false
Accept wildcard characters?False

-Force<SwitchParameter>

Specifies whether to overwrite existing file or not.

Required?False
Position?named
Default value 
Accept pipeline input??false
Accept wildcard characters?False

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS

PKI.CertificateServices.DB.RequestRow

OUTPUTS

System.Security.Cryptography.X509Certificates.X509Certificate2

NOTES

Author: Vadims Podans
Blog: http://en-us.sysadmins.lv

EXAMPLES

-------------- Example 1 --------------

PS C:\> Get-CertificationAuthority -Name MyCA | Get-IssuedRequest -Filter "CertificateTemplate -eq WebServer", "CommonName -eq www.company.com" | Receive-Certificate -Path C:\certs -Force

In this example, the commands retrieve all issued certificates based on 'WebServer' template and issued to 'www.company.com' name and save them in 'C:\certs' folder.

RELATED LINKS

Get-CertificationAuthority
Connect-CertificationAuthority
Get-IssuedRequest
Get-RevokedRequest


Viewing all articles
Browse latest Browse all 729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>