I've got a ulility that gives me text output that I read into an array of strings. The 4th word in each string is the name of the vm I need to do other operations on. How can I perform operations on that name?
Currently, I output a csv header row, change all the spaces to commas ($a = $a -replace "\s+",","), then append the string array to the file, creating a csv.
Then I read the csv back into PowerShell using Import-Csv and manipulate the .Name object.
Is there an easier way of getting this done?
Thanks