DSCResources/DSC_CertificateExport/en-US/about_CertificateExport.help.txt
.NAME
CertificateExport .DESCRIPTION The resource is used to export a certificate from a Windows certificate store. .PARAMETER Path Key - String The path to the file you that will contain the exported certificate. .PARAMETER Thumbprint Write - String The thumbprint of the certificate to export. Certificate selector parameter. .PARAMETER FriendlyName Write - String The friendly name of the certificate to export. Certificate selector parameter. .PARAMETER Subject Write - String The subject of the certificate to export. Certificate selector parameter. .PARAMETER DNSName Write - StringArray The subject alternative name of the certificate to export must contain these values. Certificate selector parameter. .PARAMETER Issuer Write - String The issuer of the certificate to export. Certificate selector parameter. .PARAMETER KeyUsage Write - StringArray The key usage of the certificate to export must contain these values. Certificate selector parameter. .PARAMETER EnhancedKeyUsage Write - StringArray The enhanced key usage of the certificate to export must contain these values. Certificate selector parameter. .PARAMETER Store Write - String The Windows Certificate Store Name to search for the certificate to export from. Certificate selector parameter. Defaults to 'My'. .PARAMETER AllowExpired Write - Boolean Allow an expired certificate to be exported. Certificate selector parameter. .PARAMETER MatchSource Write - Boolean Causes an existing exported certificate to be compared with the certificate identified for export and re-exported if it does not match. .PARAMETER Type Write - String Allowed values: Cert, P7B, SST, PFX Specifies the type of certificate to export. .PARAMETER ChainOption Write - String Allowed values: BuildChain, EndEntityCertOnly Specifies the options for building a chain when exporting a PFX certificate. .PARAMETER Password Write - Instance Specifies the password used to protect an exported PFX file. .PARAMETER ProtectTo Write - StringArray Specifies an array of strings for the username or group name that can access the private key of an exported PFX file without any password. .PARAMETER IsExported Read - Boolean Returns true if the certificate file already exists and therefore has been exported. .EXAMPLE 1 Exports a certificate as a CERT using the friendly name to identify it. Configuration CertificateExport_CertByFriendlyName_Config { Import-DscResource -ModuleName CertificateDsc Node localhost { CertificateExport SSLCert { Type = 'CERT' FriendlyName = 'Web Site SSL Certificate for www.contoso.com' Path = 'c:\sslcert.cer' } } } .EXAMPLE 2 Exports a certificate as a PFX using the friendly name to identify it. Configuration CertificateExport_PfxByFriendlyName_Config { param ( [Parameter(Mandatory = $true)] [ValidateNotNullorEmpty()] [System.Management.Automation.PSCredential] $Credential ) Import-DscResource -ModuleName CertificateDsc Node localhost { CertificateExport SSLCert { Type = 'PFX' FriendlyName = 'Web Site SSL Certificate for www.contoso.com' Path = 'c:\sslcert.cer' Password = $Credential } } } |