To clean and format a removable drive with PowerShell, use these steps:
Run PowerShell as administrator:
Get-Disk New-Partition -DiskNumber DISK-NUMBER -UseMaximumSize Get-Partition -DiskNumber DISK-NUMBER | Format-Volume -FileSystem FILE-SYSTEM -NewFileSystemLabel DRIVE-NAME Get-Partition -DiskNumber DISK-NUMBER | Set-Partition -NewDriveLetter DRIVE-LETTER