Skip to content

Latest commit

 

History

History
128 lines (102 loc) · 2.8 KB

File metadata and controls

128 lines (102 loc) · 2.8 KB

DSC Resource 'WindowsEventLogs'

WindowsEventLogs configures Windows event log properties such as log size, retention, and security.

When to use 'WindowsEventLogs'

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

Table 1. Attributes of category 'WindowsEventLogs'
Parameter Attribute DataType Description Allowed Values

Logs

Mandatory

Hashtable[]

Table 2. Attributes of category 'WindowsEventLogs/Logs'
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

  • True

  • False

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

  • AutoBackup

  • Circular

  • Retain

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

Example
WindowsEventLogs:
  Logs:
    - LogName: System
      LogMode: Circular
      MaximumSizeInBytes: 20971520
    - LogName: Directory Service
      LogMode: Circular
      MaximumSizeInBytes: 5242880
    - LogName: Application
      LogMode: Retain
      MaximumSizeInBytes: 2048KB
      LogRetentionDays: 30