I am wondering how I can tell powershell to wait for a certain log line before continuing with the script. I managed to use the following tell powershell what to look for,
Get-Content log.txt -Wait | select-string "keyword"
But powershell will never continue due the use of -Wait. Is there another way I can tell powershell to only wait for the line to appear once before proceeding?
Better way to get this to work:
Might not be efficient, but you can try it this way: