# Commandes de Base de DiskPart

### **1. Lister les Disques**

- Commande : **`list disk`**
- Utilisation : Affiche tous les disques durs connectés à l'ordinateur.

[![image.png](https://librenard.fr/wiki/uploads/images/gallery/2024-03/scaled-1680-/image.png)](https://librenard.fr/wiki/uploads/images/gallery/2024-03/image.png)

### **2. Sélectionner un Disque**

- Commande : **`select disk [numéro]`**
- Utilisation : Sélectionnez le disque sur lequel vous souhaitez travailler en remplaçant **`[numéro]`** par le numéro du disque.

[![image.png](https://librenard.fr/wiki/uploads/images/gallery/2024-03/scaled-1680-/1JBimage.png)](https://librenard.fr/wiki/uploads/images/gallery/2024-03/1JBimage.png)

### **3. Lister les Partitions**

- Commande : **`list partition`**
- Utilisation : Affiche toutes les partitions sur le disque sélectionné.

[![image.png](https://librenard.fr/wiki/uploads/images/gallery/2024-03/scaled-1680-/uPcimage.png)](https://librenard.fr/wiki/uploads/images/gallery/2024-03/uPcimage.png)

### **4. Sélectionner une Partition**

- Commande : **`select partition [numéro]`**
- Utilisation : Sélectionnez la partition que vous souhaitez gérer.

[![image.png](https://librenard.fr/wiki/uploads/images/gallery/2024-03/scaled-1680-/a9rimage.png)](https://librenard.fr/wiki/uploads/images/gallery/2024-03/a9rimage.png)

### **5. Créer une Partition**

- Commande : **`create partition primary size=[taille en Mo]`**
- Utilisation : Crée une nouvelle partition primaire avec la taille spécifiée.

[![image.png](https://librenard.fr/wiki/uploads/images/gallery/2024-03/scaled-1680-/WZJimage.png)](https://librenard.fr/wiki/uploads/images/gallery/2024-03/WZJimage.png)

### **6. Formater une Partition**

- Commande : **`format fs=ntfs quick`**
- Utilisation : Formate la partition sélectionnée en NTFS rapidement.

[![image.png](https://librenard.fr/wiki/uploads/images/gallery/2024-03/scaled-1680-/jjlimage.png)](https://librenard.fr/wiki/uploads/images/gallery/2024-03/jjlimage.png)

### **7. Assigner une Lettre de Lecteur**

- Commande : **`assign letter=[lettre]`**
- Utilisation : Attribue une lettre de lecteur à la partition sélectionnée.

[![image.png](https://librenard.fr/wiki/uploads/images/gallery/2024-03/scaled-1680-/DkTimage.png)](https://librenard.fr/wiki/uploads/images/gallery/2024-03/DkTimage.png)

### **8. Supprimer une Partition**

- Commande : **`delete partition`**
- Utilisation : Supprime la partition sélectionnée.

[![image.png](https://librenard.fr/wiki/uploads/images/gallery/2024-03/scaled-1680-/JtYimage.png)](https://librenard.fr/wiki/uploads/images/gallery/2024-03/JtYimage.png)