Powershell can't reset disk

I was recommended to post this Powershell question here:  https://social.technet.microsoft.com/Forums/windowsserver/en-US/fc79faab-24ab-43a0-b8d4-08ebdff7cae6/powershell-cant-reset-disk?forum=winserverfiles

I need a PowerShell command to do exactly the same thing as clicking Reset on a formatted partition in the Storage Spaces UI. These commands don't work:

Reset-PhysicalDisk physicaldisk1 --> has no effect!

Initialize-Disk 1 -PartitionStyle Unknown  --> error "the disk is already initialized"

Remove-Partition 1 --> prompts endlessly for partition

September 14th, 2015 10:26am

Read the help and the exampes: https://technet.microsoft.com/en-us/library/hh848660(v=wps.630).aspx
Free Windows Admin Tool Kit Click here and download it now
September 14th, 2015 12:05pm

Thanks jrv, but maybe you didn't read my post? reset-physicaldisk "physicaldisk2" has no effect on the CanPool property. In the UI, the partition type is still listed as MBR even after running reset-physicaldisk.
September 14th, 2015 12:40pm

You asked how to reset the disk. Perhaps you are asking the wrong question.  Are you trying to change the partition type?

Free Windows Admin Tool Kit Click here and download it now
September 14th, 2015 12:50pm

You might also start by reviewing the blog on  how the CmdLets work: http://blogs.msdn.com/b/san/archive/2012/07/03/managing-storage-with-windows-powershell-on-windows-server-2012.aspx
September 14th, 2015 12:55pm

Thanks jrv. Here's the sequence that worked to change the partition to Unknown. Reset didn't work until after Clear-disk with RemoveData...

get-disk

Clear-Disk 1 -RemoveData    # replace with your disk number

Get-PhysicalDisk | ft FriendlyName,MediaType,Size,CanPool

Reset-PhysicalDisk PhysicalDisk1     # replace with your disk name

  • Marked as answer by scottz1 12 hours 12 minutes ago
Free Windows Admin Tool Kit Click here and download it now
September 14th, 2015 2:55pm

Which was what I posted originally.

September 14th, 2015 3:14pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics