kennt jemand einen Parameter dass man bei select-string keinen Dateinamen in der Zeile zurückbekommt.
$treffer = select-string -path "c:\temp\test.txt" -pattern "0123456" $x = $treffer.ToString().Substring().IndexOf(':') $x
result
C:\temp\test.txt:2:\\dies ist der Text vom Logfile usw.\MapiHttp_2018090915-1.LOG:8:2018-09
richtig wäre
\\dies ist der Text vom Logfile usw.\MapiHttp_2018090915-1.LOG:8:2018-09
Chris