troubleshooting Question

Powershell select-string

Avatar of Bob
BobFlag for United States of America asked on
Powershell
3 Comments1 Solution60 ViewsLast Modified:
When attempting to pull all lines with, ('WilsonK21','integrate','119995
[code]
[/code],*'), in the same line. My results are only pulling all lines with WilsonK21.

String example below:
2020/01/27 17:04:11 pid 9464 WilsonK21@20.Q2.NSI_1_PIR82850.L xx.xxx.xxx.xxx [Helix P4V/NTX64/2019.2/1856742/v86] 'user-integrate -n //depot/MMMMM/CCC_LLLLLLL/DEVBox/LLLLLL_PPPPPPP_MMMM/...@119995,@119995 //depot/MMMMM/CCC_LLLLLLL/DEVBox/LLLLLL_PPPPPPP_MMMM/...'

$LogContent = Get-Content -Path "C:\Temp\Verify_Integrations\Resource_Files\Kelly_Integration_Main_To_Libert_INT_Helix_Log.txt"
$LogContent | Select-String -Pattern ('WilsonK21','integrate','119995') | select line | Out-File C:\Temp\Verify_Integrations\TestOutPut.txt -Width 350 -Encoding ascii
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros