Exporting Certificates (Command Line)
Microsoft Office Communications Server 2007 and Microsoft Office Communications Server 2007 R2 will reach end of support on January 9, 2018. To stay supported, you will need to upgrade. For more information, see Resources to help you upgrade your Office 2007 servers and clients.
The ExportPFX action is used to export a certificate from the local computer. For example, if you want to use the same certificate on multiple computers, you can export the certificate from the local computer in order to import it on another computer. The ExportPFX action requires the following syntax.
LCSCmd.exe /Cert /Action:ExportPFX /Filename:<file name> /Password:<password> /issuer:<common name of the issuer of the certificate> [/subjectName:<subject name of the certificate>] [/serialNumber:<serial number of the certificate>] [/includeChain[:{TRUE|FALSE}]] [/L:<log file path>] [/XML[:{TRUE|FALSE}]] [/?[:{TRUE|FALSE}]]
Such as:
LcsCmd.exe /Cert /Action:ExportPFX /Filename:C:\ExportedCertificate.pfx /Password:CertPAssw0rd /issuer:contoso-CA /subjectName:Pool01-Certificate
Where:
Parameter | Description |
---|---|
/Cert |
Executes the selected certificate task on the current computer. |
/Action |
Takes a string that specifies the action name. Valid action names include Request, CheckStatus, ImportResponse, ImportPFX, ExportPFX, ListCA, and ImportCAChain. |
/Filename |
Specifies the PFX file to which you want to export the certificate and its private key. |
/Password |
Specifies the PFX file password. |
/issuer |
Specifies the common name of the certificate issuer. |
/subjectName |
Specifies the subject name of the certificate. |
/serialNumber |
Specifies the certificate serial number. |
/includeChain |
Specifies whether to include the certificate chain. |
/L |
Specifies the log file path. If not specified, %TEMP%\<ActionName>[<Date>][<Time>].html is used. To disable logging, use a dash character (-) as the log file name. |
/XML |
Specifies whether the log file to be generated should be in XML format instead of HTML. |
/? |
Shows Help on usage. |
You must specify either a subject name or a serial number for the command to complete successfully. Also, you will not be able to export a certificate unless the certificate was specified as exportable when it was created. If you use the Request action to create a certificate, you can specify a certificate as exportable by setting the /exportable parameter to True.