Answered by:
powershell for event log

Question
-
hi,
Please provide me power shell script for event log to generate error,warnings and criticals to csv file, it is for multiple servers
Thanks,
srinivas
Tuesday, July 21, 2015 8:15 AM
Answers
-
Hi Srinivas,
Apart from MStoppl’s suggestion, if you want to export the events from ULS log in SharePoint, I recommend to use Get-SPLog Event command.
More reference:
https://technet.microsoft.com/en-us/library/Ff607589.aspx
https://technet.microsoft.com/en-us/library/Ff463595.aspx
Best regards,
Victoria
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.- Proposed as answer by Wendy DZMicrosoft contingent staff Wednesday, July 29, 2015 1:35 AM
- Marked as answer by Wendy DZMicrosoft contingent staff Tuesday, August 4, 2015 1:15 AM
Wednesday, July 22, 2015 8:29 AM -
E.g. get-eventlog -logname "Application" -computername localhost,server1 -EntryType Error,Warning | export-csv report.csv
More information: https://technet.microsoft.com/en-us/library/hh849834(v=wps.630).aspx
M.
- Marked as answer by Wendy DZMicrosoft contingent staff Tuesday, August 4, 2015 1:15 AM
Tuesday, July 21, 2015 8:37 AM
All replies
-
E.g. get-eventlog -logname "Application" -computername localhost,server1 -EntryType Error,Warning | export-csv report.csv
More information: https://technet.microsoft.com/en-us/library/hh849834(v=wps.630).aspx
M.
- Marked as answer by Wendy DZMicrosoft contingent staff Tuesday, August 4, 2015 1:15 AM
Tuesday, July 21, 2015 8:37 AM -
Hi Srinivas,
Apart from MStoppl’s suggestion, if you want to export the events from ULS log in SharePoint, I recommend to use Get-SPLog Event command.
More reference:
https://technet.microsoft.com/en-us/library/Ff607589.aspx
https://technet.microsoft.com/en-us/library/Ff463595.aspx
Best regards,
Victoria
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.- Proposed as answer by Wendy DZMicrosoft contingent staff Wednesday, July 29, 2015 1:35 AM
- Marked as answer by Wendy DZMicrosoft contingent staff Tuesday, August 4, 2015 1:15 AM
Wednesday, July 22, 2015 8:29 AM