Hey There,
I have multiple servers with 2+ GB log files. I need to search certain string from each logs files and pipe result to another file. For the search I use the following commands:
$script=[ScriptBlock]::Create("Get-Content -Path `"C:\Data\2GBFile.log`" | Select-String -Pattern `" 200 `" -NotMatch | Add-content -Path C:\Temp\Non.200Codes.txt")
Invoke-Command -Computer NameLogServer01 -ScriptBlock $script -AsJob
But this ends to the error message: Exception of type 'System.OutOfMemoryException' was thrown.
Is there anything what can be done?
I miss so much of the pure "find.exe".
Petri