Reputation: 609
We can use "convert dynamic" command in diskpart utility to change a disk to be dynamic on windows 2012. It there any way we can do it via code? I've checked the Storage Management powershell cmdlet, and Storage Management API. But none of them provide the capability.
Upvotes: 1
Views: 573
Reputation: 1333
You can create dynamic disk via VDS. Get IVdsSwProvider
, then create IVdsPack
, call IVdsPack->AddDisk
for each of the target disks, and finally call IVdsPack->CreateVolume
.
Upvotes: 1
Reputation: 1
i have tried this before you can actually do it using command line;
Open a command prompt and type diskpart. At the DISKPART prompt, type list disk. Make note of the disk number you want to convert to dynamic. At the DISKPART prompt, type select disk . At the DISKPART prompt, type convert dynamic.
But be careful with disks that contain multiple installations of windows. Also try http://technet.microsoft.com/en-us/library/cc731274.aspx#BKMK_CMD Goodluck...
Upvotes: 0