PowerShell PowerShell Get-Content F:\logs\20141215-access.log | %{ $result=$_ | Select-String "404" if($result -ne $null) { $result.ToString().Split(' ')[6] } } 1234567 Get-Content F:\logs\20141215-access.log | %{$result=$_ | Select-String "404"if($result -ne $null){$result.ToString().Split(' ')[6]}}