Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

WindowsEventLog: MaximumSizeInBytes change maximum limit to exceed 4GB

Đang mở
#459 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
55/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
powershell
Lĩnh vực
devops, operating-systems

Hướng nghiên cứu

Bắt đầu từ tham số MaximumSizeInBytes của resource WindowsEventLog và kiểm tra ràng buộc ValidateRange của tham số này. Xác minh phạm vi được chấp nhận bằng cấu hình Invoke-DscResource được cung cấp, sau đó xác nhận rằng các giá trị lớn hơn 4GB và tối đa đến giới hạn được yêu cầu được chấp nhận mà không có lỗi xác thực.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Problem description

Currently the MaximumSizeInBytes is limited to a max of 4GB. This should be expanded to 2TB. Cannot find the official documentation about this but there is a recent blog post about it where it mentions that it can be set to 2TB

You can set a maximum log size value of between 1024 and 2,147,483,647 kilobytes in multiples of 64 kilobytes. That's an approximate maximum log file size of 2 TB if you're feeling relaxed about the amount of storage you have. Microsoft’s current recommendation for how to configure this setting is 4GB.

Verbose logs
PowerShell DSC resource DSC_WindowsEventLog  failed to execute Set-TargetResource functionality with error message: Cannot validate argument on parameter
'MaximumSizeInBytes'. The 21474836480 argument is greater than the maximum allowed range of 4294967296. Supply an argument that is less than or equal to 4
294967296 and then try the command again
DSC configuration
$InvokeParams = @{
    Method     = 'Set'
    ModuleName = 'ComputerManagementDsc'
    Name       = 'WindowsEventLog'
    Property   = @{
        LogName            = 'System'
        IsEnabled          = $true
        LogMode            = 'Circular'
        MaximumSizeInBytes = 21474836480
    }
}
Invoke-DscResource @InvokeParams
Suggested solution

Change the ValidateRange in the MaximumSizeInBytes parameter from [ValidateRange(64KB, 4GB)] to [ValidateRange(64KB, 2TB)]

Operating system the target node is running
Windows server 2016-2025
PowerShell version and build the target node is running
Name                           Value
----                           -----
PSVersion                      5.1.26100.6584
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.26100.6584
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
ComputerManagementDsc version
ComputerManagementDsc 10.0.0  C:\Program Files\WindowsPowerShell\Modules\ComputerManagementDsc\10.0.0\ComputerManagementDsc.psd1
Ngôn ngữ chính
PowerShell
Star
338
Fork
80
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của dsccommunity/ComputerManagementDsc

Tất cả issue của dsccommunity/ComputerManagementDsc

Issue tương tự

Thêm issue về DevOps

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.