This is strictly a learning experience:
I have a .CSV file that I’m using to define my deployment environments. One of the variables has to be in a Hash Table format.
Can anyone come up with a clever way to put it all in one line?
Right now I harvest them as a string from CSV, conver to array, convert array to hash table.
Simplified code:
Foreach($i in $DefaultCSV){...
$App_Fabric_Hosts_a = $i.App_Fabric_Hosts.split(",")}
$App_Fabric_Hosts_h = @{}
foreach($r in $App_Fabric_Hosts_a){$App_Fabric_Hosts_h.add($r,"22233")}
This is the best I came up with: