Posted in
Windows Powershell |
4 Comments | 7,278 views | 28/05/2015 10:47
Following creates a new event log folder called “yusufozturk” in your Application Log Folder.
1
2
3
4
5
| # Create Event Log
New-EventLog -LogName "yusufozturk" -Source "Hyper-V" -EA SilentlyContinue
# Limit Event Log Properties
Limit-EventLog -LogName "yusufozturk" -OverflowAction "OverWriteAsNeeded" -MaximumSize 100MB -EA SilentlyContinue |
# Create Event Log
New-EventLog -LogName "yusufozturk" -Source "Hyper-V" -EA SilentlyContinue
# Limit Event Log Properties
Limit-EventLog -LogName "yusufozturk" -OverflowAction "OverWriteAsNeeded" -MaximumSize 100MB -EA SilentlyContinue
As you see, you can also set OverFlowAction and MaximumSize.