WindowsEventLogs configures Windows event log properties such as log size, retention, and security.
Use this resource when you need to configure event log settings like maximum log size, retention policy (overwrite/archive), log file paths, or access permissions. This is important for ensuring sufficient log capacity for troubleshooting and meeting compliance requirements for log retention.
Source |
|
DSC Resource |
|
Documentation |
| Parameter | Attribute | DataType | Description | Allowed Values |
|---|---|---|---|---|
Mandatory |
Hashtable[] |
Set of WindowsEventLogs |
| Parameter | Attribute | DataType | Description | Allowed Values |
|---|---|---|---|---|
LogName |
Key |
String |
Specifies the given name of a Windows Event Log |
|
IsEnabled |
Boolean |
Specifies the given state of a Windows Event Log |
|
|
MaximumSizeInBytes |
System.Int64 |
Specifies the given maximum size in bytes for a specified Windows Event Log |
>= 1028KB |
|
LogMode |
String |
Specifies the given LogMode for a specified Windows Event Log |
|
|
SecurityDescriptor |
String |
Specifies the given SecurityDescriptor for a specified Windows Event Log |
||
LogFilePath |
String |
Specifies the given LogFile path of a Windows Event Log |
||
LogRetentionDays |
System.Int32 |
Specifies the given LogRetentionDays for the Logmode 'AutoBackup' |
1 - 365 |
WindowsEventLogs:
Logs:
- LogName: System
LogMode: Circular
MaximumSizeInBytes: 20971520
- LogName: Directory Service
LogMode: Circular
MaximumSizeInBytes: 5242880
- LogName: Application
LogMode: Retain
MaximumSizeInBytes: 2048KB
LogRetentionDays: 30