I have 100 disks which I have to make online. I tried the below perl code to do the same.
foreach (1..100){
open(FILE, ">test.txt");
print FILE ("select disk $_\nonline disk");
close FILE;
system("diskpart.exe /s test.txt");
}
My question here, is there a better efficient way to execute diskpart commands in a loop, like use of shell script or anything else ?
Thanks in advance!