I have hosts file that are on workstations that I need to read a specific line to get an IP Address. The ip address differs in location
This is the line that I have found to work the best.
Get-Content hosts | Select-Object -Last 1
Any way of parsing the text file for a specific word to read and output that 1 line?
If you know what you are looking for, below will show you the matching lines in the file