LLI Wiki — My Digital Knowledge Base

PowerShell: wipe and re-initialize a disk with Clear-Disk

Clear-Disk -RemoveData to completely wipe a disk before re-initializing it (destructive command).

To completely wipe a disk (partitions and data) and return it to an uninitialized state before re-initializing it.

Dangerous: all data on the disk is destroyed, with no confirmation prompt.

Clear-Disk -Number 6 -RemoveData -Confirm:$false

The disk can then be re-initialized with Initialize-Disk.

Mastodon LLIMastodon SocialFosstodon