Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 233130

Re: Problem new-vm within a script specifying more than 1 disk

$
0
0

From Import-Csv the value is a [string], you could check by veryfing the type of this Parameter.DiskSize

Why don't you use 2 seperate columns in the CSV and use 2 variables on the DiskGB parameter.

 

The CSV

....,Disk1,Disk2,....

...,1,1,....

...,2,1....

 

When you import the CSV file you will get 2 variables $_.Disk1 and $_.Disk2.

Now feed those to the parameter

New-VM ....-DiskGB $_.Disk1,$_.Disk2

Viewing all articles
Browse latest Browse all 233130

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>