I am looking for a way to parse a text file and place the results into an array in powershell.
I know select-string -path -pattern will get all strings that match a pattern. But what if I already have a structured textfile, perhaps pipe delimminated, with new entries on each line. Like so:
prodServ1a prodServ1b prodServ1c
C:\dir\serverFile.txt
How can I place each of those servers into an array in powershell that I can loop through?