---
description: >-
  Change the management key. Management functionality is guarded by a management
  key. This key is required for administrative tasks, such as generating key
  pairs. A random key may be generated and store
---

# change-pin

## <mark style="color:red;">ykman piv</mark> access change-pin <mark style="color:red;">OPTIONS</mark>



<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;">-n, --new-pin TEXT</mark></td><td>New PIN.</td></tr><tr><td><mark style="color:red;">-P, --pin TEXT</mark></td><td>Current PIN code.</td></tr></tbody></table>



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

{% tabs %}
{% tab title="Help Command" %}
```properties
Usage: ykman.exe piv access change-pin [OPTIONS]

  Change the PIN code.

  The PIN must be between 6 and 8 characters long, and supports any type of alphanumeric characters. For cross-platform compatibility, numeric
  PINs are recommended.

Options:
  -P, --pin TEXT      Current PIN code.
  -n, --new-pin TEXT  A new PIN.
  -h, --help          Show this message and exit.
```
{% endtab %}
{% endtabs %}



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

{% tabs %}
{% tab title="example 1" %}
```
ykman piv access change-pin
```
{% endtab %}

{% tab title="example 2" %}
```
ykman piv access change-pin --pin 123456 --new-pin 654321
```
{% endtab %}
{% endtabs %}
