Deconstructing the SMS_ScheduleToken Server WMI Class

The SMS_ScheduleToken is an 8-byte field with data like “02C86BC000080000”. I found that to parse this requires looking at each byte bit-by-bit.

For example, 02C86BC000080000 in bytes is 001011001000011010111100000000000000000010000000000000000000 in bits.

Using the powershell Convert-CMSchedule command, we get:

PS XYZ:\> Convert-CMSchedule -ScheduleString 02C86BC000080000

SmsProviderObjectPath : SMS_ST_NonRecurring
DayDuration           : 0
HourDuration         : 0
IsGMT                 : False
MinuteDuration       : 0
StartTime             : 6/8/2017 10:00:00 PM

Fields common to all recurrence types

start minute   0 – 59 (000000 – 111011)
xxxxxx0000000000000000000000000000000000000000000000000000000000
start hour     0 – 23 (00000 – 10111)
000000xxxxx00000000000000000000000000000000000000000000000000000
start day       1 – 31 (00001 – 11111)
00000000000xxxxx000000000000000000000000000000000000000000000000
start month     1 – 12 (0001 – 1100)
0000000000000000xxxx00000000000000000000000000000000000000000000
years from 1970 0 – 63 (000000 – 111111) (ends with 2033)
00000000000000000000xxxxxx00000000000000000000000000000000000000
minute duration 0 – 59 (000000 – 111011)
00000000000000000000000000xxxxxx00000000000000000000000000000000
hour duration   0 – 23 (00000 – 10111)
00000000000000000000000000000000xxxxx000000000000000000000000000
day duration   0 – 31 (00000 – 11111)
0000000000000000000000000000000000000xxxxx0000000000000000000000
recurrence type 0 – 7 (see below)
000000000000000000000000000000000000000000xxx0000000000000000000
is GMT         0 – 1 (0 = False, 1 = True)
000000000000000000000000000000000000000000000000000000000000000x

recurrence type

001 SMS_ST_NonRecurring
unused
000000000000000000000000000000000000000000000xxxxxxxxxxxxxxxxxx0

010 SMS_ST_RecurInterval
minute span     0 – 59 (000000 – 111011)
000000000000000000000000000000000000000000000xxxxxx0000000000000
hour span       0 – 23 (00000 – 10111)
000000000000000000000000000000000000000000000000000xxxxx00000000
day span       0 – 31 (00000 – 11111)
00000000000000000000000000000000000000000000000000000000xxxxx000
unused
0000000000000000000000000000000000000000000000000000000000000xx0

011 SMS_ST_RecurWeekly
day                 1 – 7 (001 – 111)
000000000000000000000000000000000000000000000xxx0000000000000000
for number of weeks 1 – 4 (001 – 100)
000000000000000000000000000000000000000000000000xxx0000000000000
unused
000000000000000000000000000000000000000000000000000xxxxxxxxxxxx0

100 SMS_ST_RecurMonthlyByWeekday
day                 1 –   7 (001 – 111)
000000000000000000000000000000000000000000000xxx0000000000000000
for number of months 1 – 12 (0001 – 1100)
000000000000000000000000000000000000000000000000xxxx000000000000
week order           0 –   4 (000 – 100) (0 = Last)
0000000000000000000000000000000000000000000000000000xxx000000000
unused
0000000000000000000000000000000000000000000000000000000xxxxxxxx0

101 SMS_ST_RecurMonthlyByDate
month day           0 – 31 (00001 – 11111) (0 = Last)
000000000000000000000000000000000000000000000xxxxx00000000000000
for number of months 1 – 12 (0001 – 1100)
00000000000000000000000000000000000000000000000000xxxx0000000000
unused
000000000000000000000000000000000000000000000000000000xxxxxxxxx0

000 invalid schedule type
110 invalid schedule type
111 invalid schedule type

SMS_ScheduleToken Server WMI Class
https://msdn.microsoft.com/en-us/library/cc145924.aspx
SMS_ST_NonRecurring Server WMI Class
https://msdn.microsoft.com/en-us/library/cc143487.aspx
SMS_ST_RecurInterval Server WMI Class
https://msdn.microsoft.com/en-us/library/cc146489.aspx
SMS_ST_RecurWeekly Server WMI Class
https://msdn.microsoft.com/en-us/library/cc146527.aspx
SMS_ST_RecurMonthlyByWeekday Server WMI Class
https://msdn.microsoft.com/en-us/library/cc144566.aspx
SMS_ST_RecurMonthlyByDate Server WMI Class
https://msdn.microsoft.com/en-us/library/hh442787.aspx

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s