I am trying to create a custom folder in the Application and services log area in windows event logs. Inside the folder I want to create two custom area’s ex: Area1, Area2.In Area1, I want to write the logs from one source and In Area2, I want to write logs
from another source. Original i want to do it using .net c# but as couldn't do it using c# soI used powershell script to achieve this.
the code is below:
By running this script I am able to create folder hierarchy but when I go to see the event logs It is showing error like: "Event Viewer can open the eventlog or custom view verify the event log service is running or query is to long. the data is invalid(13)."
How to resolve this issue or is there any alternative approach to do it ?Or any other way to create folder structure and then write logs in .net or through script ?
None
0 Points
1 Post
I want to create a custom folder in the Application and services log area in windows event logs
Mar 02, 2021 11:08 AM|SS_ShubhamSharma|LINK
I am trying to create a custom folder in the Application and services log area in windows event logs. Inside the folder I want to create two custom area’s ex: Area1, Area2.In Area1, I want to write the logs from one source and In Area2, I want to write logs from another source. Original i want to do it using .net c# but as couldn't do it using c# soI used powershell script to achieve this.
the code is below:
By running this script I am able to create folder hierarchy but when I go to see the event logs It is showing error like:
"Event Viewer can open the eventlog or custom view verify the event log service is running or query is to long. the data is invalid(13)."
How to resolve this issue or is there any alternative approach to do it ?Or any other way to create folder structure and then write logs in .net or through script ?