-
Notifications
You must be signed in to change notification settings - Fork 29
Description
Details of the scenario you tried and the problem that is occurring
The UpdateServicesCleanup resource will not test TimeOfDay and hence will not recreate the scheduled task with a new time if this is updated
Verbose logs showing the problem
VERBOSE: [REDACTED]: LCM: [ Start Resource ] [[UpdateServicesCleanup]UpdateServicesCleanup::[UpdateServices]REDACTED]
VERBOSE: [REDACTED]: LCM: [ Start Test ] [[UpdateServicesCleanup]UpdateServicesCleanup::[UpdateServices]REDACTED]
VERBOSE: [REDACTED]: [[UpdateServicesCleanup]UpdateServicesCleanup::[UpdateServices]REDACTED] Identified enabled scheduled task for cleanup rule. VERBOSE: [REDACTED]: LCM: [ End Test ] [[UpdateServicesCleanup]UpdateServicesCleanup::[UpdateServices]REDACTED] in 1.3020 seconds.
VERBOSE: [REDACTED]: LCM: [ Skip Set ] [[UpdateServicesCleanup]UpdateServicesCleanup::[UpdateServices]REDACTED]
VERBOSE: [REDACTED]: LCM: [ End Resource ] [[UpdateServicesCleanup]UpdateServicesCleanup::[UpdateServices]REDACTED]
Suggested solution to the issue
Add code to test TimeOfDay parameter to Test-TargetResource
The DSC configuration that is used to reproduce the issue (as detailed as possible)
UpdateServicesCleanup "UpdateServicesCleanup"
{
Ensure = "Present"
DeclineSupersededUpdates = $false
DeclineExpiredUpdates = $true
CleanupObsoleteUpdates = $true
CompressUpdates = $true
CleanupObsoleteComputers = $true
CleanupUnneededContentFiles = $true
CleanupLocalPublishedContentFiles = $true
TimeOfDay = <time of day>
}The operating system the target node is running
OsName : Microsoft Windows Server 2022 Standard
OsOperatingSystemSKU : StandardServerEdition
OsArchitecture : 64-bit
WindowsVersion : 2009
WindowsBuildLabEx : 20348.1.amd64fre.fe_release.210507-1500
OsLanguage : en-US
OsMuiLanguages : {en-US}
Version and build of PowerShell the target node is running
Name Value
PSVersion 5.1.20348.4163
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.20348.4163
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Version of the DSC module that was used
v1.3.0-preview0010]