Windows Commands / IT Support Guides
Search a Windows text log with findstr
An application log can contain thousands of lines around an incident. Filter for a known literal phrase to narrow the evidence without editing the original log.
Environment and inputs: Windows 11 · Command Prompt unless PowerShell is specified
Try the diagnostic command
Use the stated shell and platform. Replace sample domains, addresses, services and paths with values from the system you are authorized to support.
findstr /n /i /c:"connection failed" "C:\Support\app.log"
How to read the result
The command prints case-insensitive matches with line numbers. /c keeps the words together as one search string rather than treating them as independent patterns.
What to do next
Open the log around the matching lines and compare timestamps with the user's failure. Retain surrounding context so a later error is not mistaken for the first cause.
Before you make a change
Replace the example path. FINDSTR has encoding and line-length limitations; use a suitable log viewer for large or Unicode-heavy files.