If I got you right you should change your "config file" to a csv format like this:
VolName,LunName,Size
volname1,lunname1,1gb
volname2,lunname2,2gb
volname3,lunname3,3gb
Notice that the first line contains the headers. Let's say the name of the file is "LunConfig.csv". Then you could do something like this:
$LunConfig = Import-Csv -Path 'lunconfig.csv' -Delimiter ','
Foreach($Config in $LunConfig){
New-NcLun -VserverContext abc -Path "/vol/$($Config.VolName)/$($Config.LunName)" -Size $($Config.Size) -Unreserved -WhatIf
Set-NcLunSpaceReserved -VserverContext abc -path "/vol/$($Config.VolName)/$($Config.LunName)" -off -WhatIf
}
If you tested it and you're satisfied with the result you can remove the "-WhatIf"
AND ... you should take a little time and learn the basics of Powershell. I'm convinced that it will pay off for you in the future. ;-)
AND ... please format the code as code here in the forum. Otherwise it will be hard to read and to understand. Thanks
Grüße - Best regards
PS:> (79,108,97,102|%{[char]$_})-join''