none
Task Sequence Mandatory Date and Time

    Question

  • Looking for a way to check WMI for the date and time stamp for a TS mandatory assignment. So far I've checked the CCM_TaskSequence and CCM_Scheduler_ScheduledMessage Classes but haven't been able to find the mandatory assignment date/time.
    Tuesday, February 06, 2018 6:35 PM

Answers

  • Interesting. So first, sorry for leading you a bit astray, this is clearly something I haven't dug into much in the recent past or with task sequences specifically.

    From some limited testing, it looks like the client never actually knows the true schedule for a package or a task sequence. However, the next run time of a deployment is stored in CCM_Scheduler_ScheduledMessage which contains a Triggers attribute which in turn contains ScheduleStrings where the next run time is encoded.

    The key attribute for CCM_Scheduler_ScheduledMessage is ScheduleMessageID which will be named <DeploymentID>-<PackageID of TS>-<SomethingRandom>. This is the Policy ID of the policy containing the execution info for the TS.

    Here's a screenshot from my testing in my lab (use the zoom function in your browser to see the details):


    Jason | https://home.configmgrftw.com | @jasonsandys


    Tuesday, February 06, 2018 9:21 PM
    Moderator

All replies

  • This information is contained within the deployment and thus exposed by the SMS_Advertisement class (which is what deployments used to be called): https://docs.microsoft.com/en-us/sccm/develop/reference/core/servers/configure/sms_advertisement-server-wmi-class. Specifically, the AssignedSchedule attribute.

    Jason | https://home.configmgrftw.com | @jasonsandys

    Tuesday, February 06, 2018 7:10 PM
    Moderator
  • Thanks for the response Jason.  I'm looking for a way to check WMI on a client machine to determine the Task Sequences that are advertised with the mandatory date and time.  Does your above still apply?  Seems like that is a server class.

    thanks,

    Tuesday, February 06, 2018 7:29 PM
  • Ahh, sorry, missed that this was client side.

    CCM_SoftwareDistribution in the Root\ccm\policy\machine\ActualConfig namespace contains deployment info for packages and task sequences (task sequences are a special type of package).

    Is there a reason you don't just use the PowerShell cmdlets though?


    Jason | https://home.configmgrftw.com | @jasonsandys

    Tuesday, February 06, 2018 8:06 PM
    Moderator
  • I think I'm still missing something.  I don't see a property in CCM_SoftwareDistribution that tells me what the assignment date and time is.  I see ADV_ActiveTime, ADV_ExpirationTime but nothing with the mandatory assignments. I see the Boolean property for MandatoryAssignments set to True but no where does it say the assigned mandatory date/time.A

    Are there client side cmdlets for SCCM? 

    Tuesday, February 06, 2018 8:29 PM
  • Interesting. So first, sorry for leading you a bit astray, this is clearly something I haven't dug into much in the recent past or with task sequences specifically.

    From some limited testing, it looks like the client never actually knows the true schedule for a package or a task sequence. However, the next run time of a deployment is stored in CCM_Scheduler_ScheduledMessage which contains a Triggers attribute which in turn contains ScheduleStrings where the next run time is encoded.

    The key attribute for CCM_Scheduler_ScheduledMessage is ScheduleMessageID which will be named <DeploymentID>-<PackageID of TS>-<SomethingRandom>. This is the Policy ID of the policy containing the execution info for the TS.

    Here's a screenshot from my testing in my lab (use the zoom function in your browser to see the details):


    Jason | https://home.configmgrftw.com | @jasonsandys


    Tuesday, February 06, 2018 9:21 PM
    Moderator
  • Thank you for that info Jason.  That is super helpful.  So I basically need to convert the scheduleString to something friendly. 

    I've attempted to follow the below link but need to convert it to PS.  I'll continue trying to convert it but would you happen to have a PS version of the function?

    https://social.technet.microsoft.com/Forums/en-US/0915168c-94d7-4569-8653-bf975f3989a3/converting-schedule-token-from-ccmservicewindow?forum=configmanagergeneral

    Wednesday, February 07, 2018 3:05 PM
  • I may have found someone that did that work already.  I'll keep ya posted.

    https://tech.xenit.se/convert-sccm-schedule-readable-format/

    Wednesday, February 07, 2018 3:41 PM
  • Unfortunately, no.

    Jason | https://home.configmgrftw.com | @jasonsandys

    Wednesday, February 07, 2018 3:45 PM
    Moderator