Open luigilink opened 1 year ago
I changed the StartTime parameter with the value => StartTime = '2017-03-03T02:00:00' instead of StartTime = '02:00:00' If you only choose time for this parameter, it change every day and add the current date before the time value.
Problem description
Test-DscConfiguration returns false even if each parameter is in the desired state. The parameter StartTime is initialized every day so it can't be in the desired state. This task was created the april 7th.
Get-TargetResource -TaskName 'CleanLogFolders' -TaskPath 'SharePoint' Name Value
User CONTOSO\SPFarmAdm
ExecutionTimeLimit 3.00:00:00
Enable True
EventSubscription
StartTime 07/04/2023 02:00:00
LogonType Password
TaskName CleanLogFolders
ExecuteAsGMSA SPFarmAdm
RestartCount 0
DontStopOnIdleEnd False
ExecuteAsCredential CONTOSO\SPFarmAdm
WeeksInterval 0
IdleDuration 01:00:00
AllowStartIfOnBatteries False
NetworkName
Ensure Present
DontStopIfGoingOnBatteries False
DaysInterval 1
DisallowDemandStart False
DisallowStartOnRemoteAppSes... False
SynchronizeAcrossTimeZone False
RandomDelay 00:00:00
Hidden False
RunOnlyIfNetworkAvailable False
DisallowHardTerminate False
RepeatInterval 00:00:00
Description CleanLogFolders Task - Start at 2:00 daily
MultipleInstances Queue
RepetitionDuration Indefinitely
ScheduleType Daily
TaskPath \SharePoint\
StartWhenAvailable False
IdleWaitTimeout 02:00:00
RunOnlyIfIdle False
Delay 00:00:00
RestartInterval 00:00:00
ActionArguments -ExecutionPolicy Bypass E:\Tools\SCRIPTS\Clea... Compatibility Win7
ActionWorkingPath
RunLevel Highest
RestartOnIdle False
DaysOfWeek {}
Priority 7
ActionExecutable C:\Windows\System32\WindowsPowerShell\v1.0\po... WakeToRun False
Verbose logs
DSC configuration
Suggested solution
I didn't see differences between desired state and Get-TargetResource. Do I have to fill every parameters ?
Operating system the target node is running
PowerShell version and build the target node is running
ComputerManagementDsc version