Tuesday, July 28, 2015

Diskpart / s

Hello friends from the world of scripts, powershell, .vbs, .bat, and all those who invest hours working out a good old scripiteco.
This week we prepared something nice with Diskpart. For those who follow the Blog must have read something about disk reserved, right? To stay free of an incident like that, or something like that, we insert the disk D after the VM has been initialized. In this scenario we remove the template D disc and insert again after rising SO ensuring that each VM will have your disc with its unique ID and unique serial.
What needs raised? When we went up a virtual machine only with Disk C and the DVD player (Volume 0) DVD-ROM drive has signed with the letter D. This staff there began to stay cool.
Let's customize this process by removing the D volume and signing with the letter Z. And from that process we will create a partition on the disk.
The automated process requires the following command:
C: \ diskpart.exe / s C: \ temp \ scripts \ dispart.txt - This parameter will call the .txt file, drew guys? We will create a .txt file with the name diskpart.txt insertion commands listed below and saves them in the C: \ Temp \ scripts, cool? The next step is to open the CMD and insert the above command line, repeating the sequence,C: \ diskpart.exe / s C: \ temp \ scripts \ dispart.txt
Once this is done the disk is ready for use.
select volume 0
remove letter = D
assign letter Z =
select disk 1
Attributes disk clear readonly
online disk
convert MBR
create partition primary
assign letter = d
format fs = ntfs quick label = "DATA"
Active
Exit
I hope to have cooperated.

No comments:

Post a Comment