Answered by:
Browse the file log

Question
-
Hi,
I would like to use Powershell, search the whole file,
plik.log
Content
1
2
3
text1
d
f
c
v
text2
sd
g
h
...
Search for a line containing tex1 and text2 and everything between the text to another eg >>
plik2.log
# content
text1
d
f
c
v
text2
Someone will help :)
ThanksMonday, November 27, 2017 7:55 AM
Answers
-
help select-string -online
\_(ツ)_/
- Proposed as answer by frank_songMicrosoft contingent staff Friday, December 1, 2017 10:17 AM
- Marked as answer by Richard MuellerMVP, Banned Thursday, December 14, 2017 7:50 AM
Monday, November 27, 2017 11:50 AM
All replies
-
Hi,
I would like to use Powershell, search the whole file,
plik.log
Content
1
2
3
text1
d
f
c
v
text2
sd
g
h
...
Search for a line containing tex1 and text2 and everything between the text to another eg >>
plik2.log
# content
text1
d
f
c
v
text2
Someone will help :)
Thanks in advance- Merged by jrv Monday, November 27, 2017 11:48 AM Dupicate
Friday, November 24, 2017 5:32 PM -
Well, this forum isn't really about writing a script for you, but we're happy to try and answer questions! Did you have a specific question you wanted to start with?
Also find prewritten scripts here: http://gallery.technet.microsoft.com/
Learn PowerShell: https://mva.microsoft.com/en-us/training-courses/getting-started-with-microsoft-powershell-8276
Script requests: https://gallery.technet.microsoft.com/scriptcenter/site/requests
Best regards,
(79,108,97,102|%{[char]$_})-join''
Friday, November 24, 2017 5:56 PM -
Duplicate :
https://social.technet.microsoft.com/Forums/windowsserver/en-US/a42bf4bc-5d15-42a9-a474-dbf58c7a907f/browse-the-file-log?forum=winserverpowershell#c959860e-24bf-4376-ba2a-7d7681002a89
and the answer is still the same:
This forum isn't really about writing a script for you, but we're happy to try and answer questions! Did you have a specific question you wanted to start with?
Please read this first: https://social.technet.microsoft.com/Forums/office/en-US/c47b1bc2-f7fd-4d2e-8ff2-e8a81ce090d4/this-forum-is-for-scripting-questions-rather-than-script-requests?forum=ITCG
Also find prewritten scripts here: http://gallery.technet.microsoft.com/
Learn PowerShell: https://mva.microsoft.com/en-us/training-courses/getting-started-with-microsoft-powershell-8276
Script requests: https://gallery.technet.microsoft.com/scriptcenter/site/requests
Best regards,
(79,108,97,102|%{[char]$_})-join''
- Edited by BOfH-666 Monday, November 27, 2017 8:54 AM
Monday, November 27, 2017 8:52 AM -
help select-string -online
\_(ツ)_/
- Proposed as answer by frank_songMicrosoft contingent staff Friday, December 1, 2017 10:17 AM
- Marked as answer by Richard MuellerMVP, Banned Thursday, December 14, 2017 7:50 AM
Monday, November 27, 2017 11:50 AM -
Hi,
Just checking in to see if the information provided was helpful. Please let us know if you would like further assistance.
Best Regards,
FrankPlease remember to mark the replies as answers if they help and unmark them if they provide no help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.Friday, December 1, 2017 10:17 AM -
Hi,
Was your issue resolved?
If you resolved it using our solution, please "mark it as answer" to help other community members find the helpful reply quickly.
If you resolve it using your own solution, please share your experience and solution here. It will be very beneficial for other community members who have similar questions.
If no, please reply and tell us the current situation in order to provide further help.
Best Regards,
FrankPlease remember to mark the replies as answers if they help and unmark them if they provide no help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.Thursday, December 7, 2017 5:31 AM