Retrieves an X.509 certificate signing request (CSR) object from a file or a DER-encoded byte array.
Get-CertificateRequest [-Path] <String> [<CommonParameters>] Get-CertificateRequest [-RawRequest] <Byte[]> [<CommonParameters>]
Retrieves and decodes X.509 certificate request object from a file or a DER-encoded byte array.
Certificate signing request is a message sent from an applicant to a certificate authority in order to apply for a digital certificate. You can review formatted request information calling a "ToString()" method on returned object.
This command supports both, PKCS#10 and PKCS#7/CMC certificate reuqests.
Specifies the path to a certificate request file. Usually, this file has a ".req" or ".csr" file extension.
Required? | True |
Position? | 0 |
Default value | |
Accept pipeline input? | true (ByValue) |
Accept wildcard characters? | False |
Specifies a DER-encoded byte array that containg certificate request information.
Required? | True |
Position? | 0 |
Default value | |
Accept pipeline input? | false |
Accept wildcard characters? | False |
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, InformationAction, InformationVariable,
WarningAction, WarningVariable, OutBuffer, PipelineVariable and OutVariable.
For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
System.Security.Cryptography.X509CertificateRequests.X509CertificateRequest
Author: Vadims Podans
Blog: https://www.sysadmins.lv
PS C:\> Get-CertificateRequest C:\mycert.req
Retrieves certificate request object from a file.
PS C:\> $Raw = [convert]::FromBase64String($Base64encodedstring) PS C:\> Get-CertificateRequest -RawRequest $Raw
In this example, $Base64encodedstring contains certificate request in a Base64 encoding and is converted to a byte array and passed to Get-CertificateRequest to get the request object.