---
description: >-
  Export an X.509 certificate. Reads a certificate from one of the PIV slots on
  the YubiKey.
---

# export

## <mark style="color:red;">ykman piv</mark> certificates export <mark style="color:red;">OPTIONS</mark> SLOT CERTIFICATE



<table><thead><tr><th width="284">Options</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:red;">-h, --help</mark></td><td>Show this message and exit.</td></tr><tr><td><mark style="color:red;">-F, --format [PEM|DER]</mark></td><td>Encoding format. <br>[default: <mark style="color:red;"><code>PEM</code></mark>]</td></tr></tbody></table>



<table><thead><tr><th width="284">Arguments</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:red;">SLOT</mark></td><td>PIV slot of the certificate.</td></tr><tr><td><mark style="color:red;">CERTIFICATE</mark></td><td>File to write certificate to.<br>Use <mark style="color:red;"><code>'-'</code></mark> to use <mark style="color:red;"><code>stdout</code></mark>.</td></tr></tbody></table>





### <mark style="color:blue;">HELP</mark>

{% tabs %}
{% tab title="Help Command" %}
```properties
Usage: ykman.exe piv certificates export [OPTIONS] SLOT CERTIFICATE

  Export an X.509 certificate.

  Reads a certificate from one of the PIV slots on the YubiKey.

  SLOT            PIV slot of the certificate.
  CERTIFICATE     File to write certificate to. Use '-' to use stdout.

Options:
  -F, --format [PEM|DER]  Encoding format.  [default: PEM]
  -h, --help              Show this message and exit.
```
{% endtab %}
{% endtabs %}





### <mark style="color:blue;">EXAMPLE</mark>

{% tabs %}
{% tab title="example 1" %}
```
```
{% endtab %}
{% endtabs %}
