I'm trying to wipe a drive that has a Windows 10 installation on it so I can use it as a secondary drive. I've installed the drive in my new computer, but I'm running into issues trying to clean it out. When I attempt to use the 'Clean' command in CMD, I get an error saying that it can't be done on the disk that's currently booting, even though the drive isn't listed as a boot drive in system config. I also tried using PowerShell with the clear disk command, but the drive doesn't show up when I run Get-Disk. However, it does show up when I use Get-PSDrive. I'm pretty lost and would appreciate any help! Thanks! Also, I've got an Imgur link showing the output from my commands with the troubled drive labeled as G: https://imgur.com/a/Qj4NNjL
5 Answers
If you can see the drive in Disk Management but not with PowerShell, it might be due to some issues with the drive itself or even the cable. The newer PowerShell commands often don't support dynamic disks, which could explain why you're having trouble seeing it.
Yeah, I've heard that the PowerShell commands use a different API that doesn't always work with dynamic disks. I'll try using Diskpart instead.
Have you tried running `Get-Disk` and `Get-PhysicalDisk`? They might give you a clearer view of what's going on. Also, check what `Diskpart` shows when you list the disks. It's strange that you can see the drive with Get-PSDrive but not with Get-Disk.
Thanks for the response! I’ve updated my post with the imgur link showing the outputs you mentioned.
You might want to try using the CIM command `Get-CimInstance win32_logicaldisk`. It could provide additional insights about the drive. Make sure the disk is initialized and not just unassigned; you can use Diskpart to assign it if necessary.
Get-PSDrive primarily shows virtual devices, so don’t rely on that. Ensure both Diskpart and Disk Management list your physical disks accurately before attempting any cleaning operations. You wouldn’t want to lose data you didn’t intend to!
Look, if you’ve plugged in that disk and your system rebooted, it could have detected the EFI System Partition (ESP) on that drive, possibly booting from it. Make sure to validate what's actually connected before attempting to clean the disk to avoid accidental data loss. Be cautious with commands that could wipe everything!
That's interesting! I can see it in Disk Manager and even write to it, which is why it's so confusing.