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
Details of the scenario you tried and the problem that is occurring
Tried creating a scheduled task running with builtin account SYSTEM.
The task is created succesfully but listed as ResourceNotInDesiredState
Verbose logs showing the problem
Test-DscConfiguration-Detailed -Verbose
Perform operation 'Invoke CimMethod' with following parameters,''methodName' = TestConfiguration,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.
An LCM method call arrived from computer CLIENT with user sid S-1-5-21-2550973943-1965520939-3234002811-1001.
[CLIENT]: LCM: [ StartTest ]
[CLIENT]: LCM: [ StartResource ] [[ScheduledTask]CleanUpLogs]
[CLIENT]: LCM: [ StartTest ] [[ScheduledTask]CleanUpLogs]
[CLIENT]: [[ScheduledTask]CleanUpLogs] Testing scheduled task 'Cleanup WFM Logs'in'\WFM\'.
[CLIENT]: [[ScheduledTask]CleanUpLogs] Getting current scheduled task values for task
'Cleanup WFM Logs'in'\WFM\'.
[CLIENT]: [[ScheduledTask]CleanUpLogs] Task 'Cleanup WFM Logs' found in'\WFM\'. Retrieving
settings, first action, first trigger and repetition settings.
[CLIENT]: [[ScheduledTask]CleanUpLogs] Detected schedule type 'Daily'for first trigger.
[CLIENT]: [[ScheduledTask]CleanUpLogs] Current scheduled task values for task 'Cleanup WFM Logs'in'\WFM\' retrieved.
[CLIENT]: [[ScheduledTask]CleanUpLogs] Testing DSC parameter state.
[CLIENT]: [[ScheduledTask]CleanUpLogs] MATCH: Value (type 'System.String') for property
'ActionArguments' does match. Current state is '-Command "ls $ENV:TEMP -File -Recursive | where {((Get-Date) - $_.LastWriteTime).Minutes -gt 1} | Remove-Item -Confirm:$false -Force"' and desired state is '-Command "ls $ENV:TEMP -File -Recursive | where {((Get-Date) - $_.LastWriteTime).Minutes -gt 1} | Remove-Item -Confirm:$false -Force"'.
[CLIENT]: [[ScheduledTask]CleanUpLogs] MATCH: Value (type 'System.String') for property
'ActionExecutable' does match. Current state is '%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe' and
desired state is '%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe'.
[CLIENT]: [[ScheduledTask]CleanUpLogs] MATCH: Value (type 'System.String') for property
'TaskName' does match. Current state is 'Cleanup WFM Logs' and desired state is 'Cleanup WFM Logs'.
[CLIENT]: [[ScheduledTask]CleanUpLogs] MATCH: Value (type 'System.String') for property
'TaskPath' does match. Current state is '\WFM\' and desired state is '\WFM\'.
[CLIENT]: [[ScheduledTask]CleanUpLogs] MATCH: Value (type 'System.String') for property
'User' does match. Current state is 'SYSTEM' and desired state is 'SYSTEM'.
[CLIENT]: [[ScheduledTask]CleanUpLogs] MATCH: Value (type 'System.String') for property
'Ensure' does match. Current state is 'Present' and desired state is 'Present'.
[CLIENT]: [[ScheduledTask]CleanUpLogs] NOTMATCH: Value (type 'System.String') for property
'BuiltInAccount' does not match. Current state is 'NT AUTHORITY\SYSTEM' and desired state is 'SYSTEM'.
[CLIENT]: [[ScheduledTask]CleanUpLogs] MATCH: Value (type 'System.Boolean') for property
'StartWhenAvailable' does match. Current state is 'True' and desired state is 'True'.
[CLIENT]: [[ScheduledTask]CleanUpLogs] MATCH: Value (type 'System.String') for property
'StartTime' does match. Current state is '2020-03-18T21:00:00' and desired state is '2020-03-18T21:00:00'.
[CLIENT]: [[ScheduledTask]CleanUpLogs] MATCH: Value (type 'System.String') for property
'LogonType' does match. Current state is 'ServiceAccount' and desired state is 'ServiceAccount'.
[CLIENT]: [[ScheduledTask]CleanUpLogs] MATCH: Value (type 'System.Boolean') for property
'Enable' does match. Current state is 'True' and desired state is 'True'.
[CLIENT]: [[ScheduledTask]CleanUpLogs] MATCH: Value (type 'System.String') for property
'ScheduleType' does match. Current state is 'Daily' and desired state is 'Daily'.
[CLIENT]: [[ScheduledTask]CleanUpLogs] MATCH: Value (type 'System.String') for property
'ExecuteAsCredential' does match. Current state is 'SYSTEM' and desired state is 'SYSTEM'.
[CLIENT]: [[ScheduledTask]CleanUpLogs] Test-DscParameter result is 'False'.
[CLIENT]: LCM: [ EndTest ] [[ScheduledTask]CleanUpLogs] False in1.1720 seconds.
[CLIENT]: LCM: [ EndResource ] [[ScheduledTask]CleanUpLogs]
[CLIENT]: LCM: [ EndTest ] Completed processing test operation. The operation returned False.
[CLIENT]: LCM: [ EndTest ] in1.6560 seconds.
Operation 'Invoke CimMethod' complete.
PSComputerName ResourcesInDesiredState ResourcesNotInDesiredState InDesiredState
-----------------------------------------------------------------------------
localhost {[ScheduledTask]CleanUpLogs} False
Time taken for configuration job to complete is 1.774 seconds
Suggested solution to the issue
The resource only accepts 'SYSTEM' as input. But Scheduled task actually converts this to 'NT AUTHORITY\SYSTEM'
Please have the MOF created with 'NT AUTHORITY\SYSTEM' instead of 'SYSTEM' when specifying BuiltInAccount = 'SYSTEM' and have the resource accept the entry.
The DSC configuration that is used to reproduce the issue (as detailed as possible)
Details of the scenario you tried and the problem that is occurring
Tried creating a scheduled task running with builtin account SYSTEM.
The task is created succesfully but listed as ResourceNotInDesiredState
Verbose logs showing the problem
Suggested solution to the issue
The resource only accepts 'SYSTEM' as input. But Scheduled task actually converts this to 'NT AUTHORITY\SYSTEM'
Please have the MOF created with 'NT AUTHORITY\SYSTEM' instead of 'SYSTEM' when specifying BuiltInAccount = 'SYSTEM' and have the resource accept the entry.
The DSC configuration that is used to reproduce the issue (as detailed as possible)
The operating system the target node is running
Version and build of PowerShell the target node is running
Version of the DSC module that was used ('dev' if using current dev branch)
The text was updated successfully, but these errors were encountered: