Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Issues with Missing DSC Schedules Tasks
#Status after configuring LCM and running Update-DscConfiguration
PS C:\windows\system32\Configuration> Get-DscConfigurationStatus
Status StartDate Type Mode RebootRequested NumberOfResources
------ --------- ---- ---- --------------- -----------------
Success 2015/04/17 19:40:47 Initial Pull False 19
#Status after restarting the server
PS C:\windows\system32> Get-DscConfigurationStatus
Status StartDate Type Mode RebootRequested NumberOfResources
------ --------- ---- ---- --------------- -----------------
Success 2015/04/17 20:18:29 Reboot Pull False 19
PS C:\windows\system32\Configuration> Get-DscLocalConfigurationManager
ActionAfterReboot : ContinueConfiguration
AllowModuleOverWrite : True
CertificateID : 54925F3A049201EB6061789A8D09D37639F77015
ConfigurationDownloadManagers : {}
ConfigurationID : 211a272b-94b5-4c0d-9f82-f4fb6efb70b0
ConfigurationMode : ApplyAndAutoCorrect
ConfigurationModeFrequencyMins : 60
Credential :
DebugMode : {NONE}
DownloadManagerCustomData : {MSFT_KeyValuePair (key = "ServerUrl"), MSFT_KeyValuePair (key =
"AllowUnsecureConnection")}
DownloadManagerName : WebDownloadManager
LCMCompatibleVersions : {1.0, 2.0}
LCMState : Ready
LCMVersion : 2.0
MaxPendingConfigRetryCount :
StatusRetentionTimeInDays : 10
PartialConfigurations : {}
RebootNodeIfNeeded : True
RefreshFrequencyMins : 30
RefreshMode : Pull
ReportManagers : {}
ResourceModuleManagers : {}
PSComputerName :
PS C:\windows\system32> Get-ScheduledTask -TaskPath "\Microsoft\Windows\D*"
TaskPath TaskName State
-------- -------- -----
\Microsoft\Windows\Data Integrity Scan\ Data Integrity Scan Ready
\Microsoft\Windows\Data Integrity Scan\ Data Integrity Scan for Crash ... Ready
\Microsoft\Windows\Defrag\ ScheduledDefrag Ready
\Microsoft\Windows\Device Setup\ Metadata Refresh Ready
PS C:\windows\system32> schtasks /query /fo list /v /TN "\Microsoft\Windows\Desired State Configuration\Consistency"
ERROR: The system cannot find the file specified.
PS C:\windows\system32> schtasks /query /fo list /v /TN "\Microsoft\Windows\Desired State Configuration\DSCRestartBootTask"
ERROR: The system cannot find the file specified.
#Expected:
PS C:\windows\system32\Configuration> Get-ScheduledTask -TaskPath "\Microsoft\Windows\D*"
TaskPath TaskName State
-------- -------- -----
\Microsoft\Windows\Data Integrity Scan\ Data Integrity Scan Ready
\Microsoft\Windows\Data Integrity Scan\ Data Integrity Scan for Crash ... Ready
\Microsoft\Windows\Defrag\ ScheduledDefrag Ready
\Microsoft\Windows\Desired State Configurat... Consistency Ready
\Microsoft\Windows\Desired State Configurat... DSCRestartBootTask Ready
\Microsoft\Windows\Device Setup\ Metadata Refresh Ready
PS C:\windows\system32\Configuration> schtasks /query /fo list /v /TN "\Microsoft\Windows\Desired State Configuration\Consistency"
Folder: \Microsoft\Windows\Desired State Configuration
HostName: NY-RDP01
TaskName: \Microsoft\Windows\Desired State Configuration\Consistency
Next Run Time: 4/17/2015 8:42:33 PM
Status: Ready
Logon Mode: Interactive/Background
Last Run Time: 4/17/2015 8:10:07 PM
Last Result: -2147024895
Author: SYSTEM
Task To Run: PowerShell.exe -NonInt -Window Hidden -Command "Invoke-CimMethod -Namespace root/Microsoft/Windows/DesiredStateConfiguration -Cl MSFT_DSCLocalConfigurationManager -Method Perform
RequiredConfigurationChecks -Arguments @{Flags = [System.UInt32]1}"
Start In: N/A
Comment: N/A
Scheduled Task State: Enabled
Idle Time: Disabled
Power Management: Stop On Battery Mode, No Start On Batteries
Run As User: SYSTEM
Delete Task If Not Rescheduled: Disabled
Stop Task If Runs X Hours and X Mins: 72:00:00
Schedule: Scheduling data is not available in this format.
Schedule Type: One Time Only, Minute
Start Time: 10:24:03 PM
Start Date: 8/12/2014
End Date: N/A
Days: N/A
Months: N/A
Repeat: Every: 0 Hour(s), 15 Minute(s)
Repeat: Until: Time: None
Repeat: Until: Duration: Disabled
Repeat: Stop If Still Running: Disabled
PS C:\windows\system32\Configuration> schtasks /query /fo list /v /TN "\Microsoft\Windows\Desired State Configuration\DSCRestartBootTask"
Folder: \Microsoft\Windows\Desired State Configuration
HostName: NY-RDP01
TaskName: \Microsoft\Windows\Desired State Configuration\DSCRestartBootTask
Next Run Time: N/A
Status: Ready
Logon Mode: Interactive/Background
Last Run Time: 3/23/2015 10:44:19 PM
Last Result: -2147024895
Author: SYSTEM
Task To Run: PowerShell.exe -NonInt -Window Hidden -Command "Invoke-CimMethod -Namespace root/Microsoft/Windows/DesiredStateConfiguration -ClassName MSFT_DSCLocalConfigurationManager -MethodN
ame PerformRequiredConfigurationChecks -Arg @{Flags = [System.UInt32]2 }"
Start In: N/A
Comment: N/A
Scheduled Task State: Enabled
Idle Time: Disabled
Power Management: Stop On Battery Mode, No Start On Batteries
Run As User: SYSTEM
Delete Task If Not Rescheduled: Disabled
Stop Task If Runs X Hours and X Mins: 72:00:00
Schedule: Scheduling data is not available in this format.
Schedule Type: At system start up
Start Time: N/A
Start Date: N/A
End Date: N/A
Days: N/A
Months: N/A
Repeat: Every: N/A
Repeat: Until: Time: N/A
Repeat: Until: Duration: N/A
Repeat: Stop If Still Running: N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.