fbpx
O F E P

Loading

OFEP Société Informatique Top Rated In Brussels Web, Consultancy And Cybersecurity.
Initialisation d’un disque dur (physique ou virtuel) via powershell

Quelques commandes clés pour paramétriser un disque dur (physique ou virtuel) via les commandes Power shell.

  1. Vérifier le statut actuel

PS C:\> get-disk

Number Friendly Name                            OperationalStatus                    Total Size Partition Style
—— ————-                            —————–                    ———- —————
1      VMware Virtual disk SCSI Disk Device     Offline                                    1 TB RAW
0      VMware Virtual disk SCSI Disk Device     Online                                    34 GB MBR

Il s’agit ici du disque numéro 1 de 1 Tera qui est actuellement au statut “Offline”.

 

2. Initialiser le disque

PS C:\> initialize-disk 1
PS C:\> new-partition -disknumber 1 -usemaximumsize -assigndriveletter
Disk Number: 1

PartitionNumber  DriveLetter Offset                                        Size Type
—————  ———– ——                                        —- —-
2                E           135266304                               1023.87 GB Basic
3. Vérifier à nouveau le statut
PS C:\Program Files\Probus-IT\Hyper-V Tools\Backup> get-disk

Number Friendly Name                            OperationalStatus                    Total Size Partition Style
—— ————-                            —————–                    ———- —————
1      VMware Virtual disk SCSI Disk Device     Online                                     1 TB GPT
0      VMware Virtual disk SCSI Disk Device     Online                                    34 GB MBR

 

Le disque a maintenant un statut “Online”.

Leave a Reply

Your email address will not be published. Required fields are marked *

Get in Touch

Subscribe and stay up-to-date on the latest improvements and services.