I have a loop that uses the foreach keyword:
foreach ($ln in Get-Content "c:\ATextFile.txt" )
Is it possible to find out the index of the array referenced by $ ln during the iteration? Or do I need to create and increase a separate count variable for each iteration of the loop?
source share