Let's say I have this CSV file
customer 60; SomeLocation; 60
customer 120; SomeLocation; 120
customer 140; SomeLocation; 140
customer 200; SomeLocation; 200
customer 300; SomeLocation; 300
I'm importing using Import-CSV. I'm able to walk through every line and filter each property using pre-set headers. I want to set a target, let's say 140. I want to use $random to pick some line, let's say
customer 200; SomeLocation; 200
Now, as 200 is bigger than 140, I want to remove it from memory (not from the CSV), but looks like I'm having an issue understanding how can I manipulate Arrays, since I'm getting Collection was of a fixed size. all the way.
I know how to do the random stuff, but I'm struggling finding out a way to import the CSV and use it freely.

import-csvis correct, try and also define-delimiterparameter. Also post your code with which you are trying to manipulate the array.Import-CSVandConvertFrom-CSVsupport the-Headerparameter to define headerless csvs so the lack of header in the csv itself is not really a problem here.