How to carve Veritas Disk using Powershell

vxdisk list
$HW=”Harddisk”
$coln=”:”
$Contents=Import-Csv readdrivers.csv
Foreach($Content in $contents){

$DiskGroup=$Content.DG
$DriveLetter=$Content.DL
$VolumeName=$Content.Vol
$HDisk=read-host “Harddisk Number”
$Size=read-host “Size of the volume”

vxdg -g $DiskGroup -s init $HW$HDisk
vxassist -g $DiskGroup make $VolumeName $Size  Driveletter=$DriveLetter

format $DriveLetter$coln /FS:NTFS /V:$VolumeName /X /Y
Write-host “+=============++++==============+++++================++=============++++==============+++++================+”
vxdisk list
Write-host “+=============++++==============+++++================++=============++++==============+++++================+”

}

“=+==============Contens of  readdrivers.csv =============++++=”

MLON99T11830A_Data,G,Vol_G
MLON99T11830A_Dump,I,Vol_I
MLON99T11830A_Log,L,Vol_L
MLON99T11830B_Data,R,Vol_R
MLON99T11830B_Log,T,Vol_T

“=+==============Contens of  readdrivers.csv =============++++=”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: