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

ScheduledTask

Đang mở
#360 1 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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
30/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
powershell
Lĩnh vực
operating-systems

Hướng nghiên cứu

Bắt đầu với đường dẫn Set-TargetResource của tài nguyên ScheduledTask và tái hiện cấu hình được cung cấp trên Windows 10. So sánh hành vi vô hiệu hóa liên quan đến Register-ScheduledTask với phương án thay thế Disable-ScheduledTask được báo cáo; hoàn thành khi tác vụ hiện có được vô hiệu hóa mà không có HRESULT 0x80070057.

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

Mô tả

bug needs investigation
Details of the scenario you tried and the problem that is occurring

Following the example in the documentation for disabling a built-in task I am receiving the error message that "The parameter is incorrect." at the 'Disabling' step. See below for more details:

Verbose logs showing the problem

VERBOSE: [WVD-CSR-DEV-1]: [[ScheduledTask]DisableWUScheduledStart] Detected schedule type 'Once' for first trigger.
VERBOSE: [WVD-CSR-DEV-1]: [[ScheduledTask]DisableWUScheduledStart] Current scheduled task values for task 'Scheduled Start' in '\Microsoft\Windows\WindowsUpdate' retrieved.
VERBOSE: [WVD-CSR-DEV-1]: [[ScheduledTask]DisableWUScheduledStart] Disabling existing scheduled task 'Scheduled Start' in '\Microsoft\Windows\WindowsUpdate'.
The parameter is incorrect.
+ CategoryInfo : InvalidArgument: (PS_ScheduledTask:) [], CimException
+ FullyQualifiedErrorId : HRESULT 0x80070057,Register-ScheduledTask
+ PSComputerName : localhost
VERBOSE: [WVD-CSR-DEV-1]: LCM: [ End Set ] [[ScheduledTask]DisableWUScheduledStart] in 1.9150 seconds.
The PowerShell DSC resource '[ScheduledTask]DisableWUScheduledStart' with SourceInfo 'C:\Users\asmith84\Dev\MSIXHostSettings.ps1::53::9::ScheduledTask' threw one or more non-terminating errors while
running the Set-TargetResource functionality. These errors are logged to the ETW channel called Microsoft-Windows-DSC/Operational. Refer to this channel for more details.
+ CategoryInfo : InvalidOperation: (:) [], CimException
+ FullyQualifiedErrorId : NonTerminatingErrorFromProvider
+ PSComputerName : localhost

Suggested solution to the issue

Review/Debug and correct what may be causing this error. In general it seems that the module is using the "Register-ScheduledTask" cmdlet, but perhaps in the case of disabling an exisiting task, the Set-TargetResource method should be using "Disable-ScheudledTask" instead?

The DSC configuration that is used to reproduce the issue (as detailed as possible)
Configuration MSIXHostSettings {

    Import-DscResource -ModuleName PsDesiredStateConfiguration
    Import-DscResource -ModuleName ComputerManagementDsc

    Node 'localhost' {

        ScheduledTask DisableWUScheduledStart {
            TaskName = "Scheduled Start"
            TaskPath = "\Microsoft\Windows\WindowsUpdate\"
            Enable = $false
        }
    }
}
The operating system the target node is running

OsName : Microsoft Windows 10 Enterprise for Virtual Desktops
OsOperatingSystemSKU : 175
OsArchitecture : 64-bit
WindowsVersion : 2009
WindowsBuildLabEx : 19041.1.amd64fre.vb_release.191206-1406
OsLanguage : en-US
OsMuiLanguages : {en-US}

Version and build of PowerShell the target node is running

Name Value


PSVersion 5.1.19041.610
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.610
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Version of the DSC module that was used ('dev' if using current dev branch)

master - whatever is on PSGallery

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ề Operating Systems

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.