You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
[[ScheduledTask]APPLICATION_CleanLogFolders_SCript] MATCH: Value (type
2023-04-17T08:57:43.1627197Z 'System.String') for property 'ActionArguments' does match. Current state is
2023-04-17T08:57:43.1627727Z '-ExecutionPolicy Bypass
2023-04-17T08:57:43.1628003Z E:\Tools\SCRIPTS\CleanLogFolders\1.0.0\CleanLogFolders.ps1' and desired state
2023-04-17T08:57:43.1628084Z is '-ExecutionPolicy Bypass
2023-04-17T08:57:43.1628142Z E:\Tools\SCRIPTS\CleanLogFolders\1.0.0\CleanLogFolders.ps1'. (DRC0020)
2023-04-17T08:57:43.1650740Z VERBOSE: [**************]:
2023-04-17T08:57:43.1650865Z [[ScheduledTask]APPLICATION_CleanLogFolders_SCript] MATCH: Value (type
2023-04-17T08:57:43.1650927Z 'System.String') for property 'Description' does match. Current state is
2023-04-17T08:57:43.1651003Z 'CleanLogFolders Task - Start at 2:00 daily' and desired state is
2023-04-17T08:57:43.1651088Z 'CleanLogFolders Task - Start at 2:00 daily'. (DRC0020)
2023-04-17T08:57:43.1666225Z VERBOSE: [**************]:
2023-04-17T08:57:43.1666457Z [[ScheduledTask]APPLICATION_CleanLogFolders_SCript] MATCH: Value (type
2023-04-17T08:57:43.1666604Z 'System.String') for property 'ScheduleType' does match. Current state is
2023-04-17T08:57:43.1666796Z 'Daily' and desired state is 'Daily'. (DRC0020)
2023-04-17T08:57:43.1682494Z VERBOSE: [**************]:
2023-04-17T08:57:43.1682655Z [[ScheduledTask]APPLICATION_CleanLogFolders_SCript] MATCH: Value (type
2023-04-17T08:57:43.1682726Z 'System.String') for property 'TaskPath' does match. Current state is
2023-04-17T08:57:43.1682789Z '\SharePoint\' and desired state is '\SharePoint\'. (DRC0020)
2023-04-17T08:57:43.1698866Z VERBOSE: [**************]:
2023-04-17T08:57:43.1699085Z [[ScheduledTask]APPLICATION_CleanLogFolders_SCript] MATCH: Value (type
2023-04-17T08:57:43.1699584Z 'System.String') for property 'Ensure' does match. Current state is 'Present'
2023-04-17T08:57:43.1699686Z and desired state is 'Present'. (DRC0020)
2023-04-17T08:57:43.1714922Z VERBOSE: [**************]:
2023-04-17T08:57:43.1715064Z [[ScheduledTask]APPLICATION_CleanLogFolders_SCript] MATCH: Value (type
2023-04-17T08:57:43.1715140Z 'System.Boolean') for property 'Enable' does match. Current state is 'True' and
2023-04-17T08:57:43.1715203Z desired state is 'True'. (DRC0020)
2023-04-17T08:57:43.1730826Z VERBOSE: [**************]:
2023-04-17T08:57:43.1731062Z [[ScheduledTask]APPLICATION_CleanLogFolders_SCript] MATCH: Value (type
2023-04-17T08:57:43.1731231Z 'System.UInt32') for property 'DaysInterval' does match. Current state is '1'
2023-04-17T08:57:43.1731811Z and desired state is '1'. (DRC0020)
2023-04-17T08:57:43.1748142Z VERBOSE: [**************]:
2023-04-17T08:57:43.1748330Z [[ScheduledTask]APPLICATION_CleanLogFolders_SCript] MATCH: Value (type
2023-04-17T08:57:43.1748392Z 'System.String') for property 'RunLevel' does match. Current state is 'Highest'
2023-04-17T08:57:43.1748450Z and desired state is 'Highest'. (DRC0020)
2023-04-17T08:57:43.1764069Z VERBOSE: [**************]:
2023-04-17T08:57:43.1764274Z [[ScheduledTask]APPLICATION_CleanLogFolders_SCript] MATCH: Value (type
2023-04-17T08:57:43.1764367Z 'System.String') for property 'TaskName' does match. Current state is
2023-04-17T08:57:43.1765196Z 'CleanLogFolders' and desired state is 'CleanLogFolders'. (DRC0020)
2023-04-17T08:57:43.1780703Z VERBOSE: [**************]:
2023-04-17T08:57:43.1780913Z [[ScheduledTask]APPLICATION_CleanLogFolders_SCript] NOTMATCH: Value (type
2023-04-17T08:57:43.1780989Z 'System.String') for property 'StartTime' does not match. Current state is
2023-04-17T08:57:43.1781751Z '2023-04-07T02:00:00' and desired state is '2023-04-17T02:00:00'. (DRC0021)
2023-04-17T08:57:43.1797770Z VERBOSE: [**************]:
2023-04-17T08:57:43.1798238Z [[ScheduledTask]APPLICATION_CleanLogFolders_SCript] MATCH: Value (type
2023-04-17T08:57:43.1798359Z 'System.String') for property 'ExecuteAsCredential' does match. Current state
2023-04-17T08:57:43.1798434Z is 'CONTOSO\SPFarmAdm' and desired state is 'CONTOSO\SPFarmAdm'.
2023-04-17T08:57:43.1798510Z (DRC0020)
2023-04-17T08:57:43.1814044Z VERBOSE: [**************]:
2023-04-17T08:57:43.1814196Z [[ScheduledTask]APPLICATION_CleanLogFolders_SCript] MATCH: Value (type
2023-04-17T08:57:43.1814258Z 'System.String') for property 'ActionExecutable' does match. Current state is
2023-04-17T08:57:43.1814321Z 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' and desired state
2023-04-17T08:57:43.1814570Z is 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe'. (DRC0020)
2023-04-17T08:57:43.1824332Z VERBOSE: [**************]: LCM: [ End Test ]
2023-04-17T08:57:43.1825727Z [[ScheduledTask]APPLICATION_CleanLogFolders_SCript] False in 2.2350 seconds.
2023-04-17T08:57:43.1832444Z VERBOSE: [**************]: LCM: [ End Resource ]
2023-04-17T08:57:43.1834624Z [[ScheduledTask]APPLICATION_CleanLogFolders_SCript]
Name Version Path
---- ------- ----
ComputerManagementDsc 9.0.0 C:\Program Files\WindowsPowerShell\Modules\ComputerManagementDsc\9.0.0\ComputerManagem...
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: