Share via


Query Daylight Saving Time information with SCCM

Many system administrators regularly get asked about computers Daylight Saving Time (DST) information in there network.

With SCCM you can easily get that information with simple query and add it to collection.

First, to get time zone information we need to add Time Zone class to hardware inventory in the relevant client settings:

https://1.bp.blogspot.com/-btk-_9ylW6M/Vh6HbZdlxrI/AAAAAAAADqs/synHXXOiwsg/s320/1.jpg

Soon as the clients will get the new policy and send hardware inventory to the server, we can start with the query.

Next step is to determine when DST will start\end. in this example, DST will end on October-25-15:

https://1.bp.blogspot.com/-Qi1C3mQAuxs/Vh6JKgu20WI/AAAAAAAADq4/c-dIXRhBQqA/s320/0.JPG

Create new collection with the following query:

Creation Type = Simple Value

Attribute class = Time Zone

Attributes:

  • Standard Day with value of 5 - the First, Second, Third, Fourth, or last day on month that the time changes (1 = First, 2 = Second.... 5 = Last).
  • Standard Day Of Week with value of 0 - the day of the week the time change will occur (0 = Sunday, 1 = Monday.... 6 = Saturday).
  • Time Zone Standard Month with value of 10 - the month the time change will occur (1 = January, 2 = February...)

https://3.bp.blogspot.com/-lwl_94U6Y-4/Vh9SCtlaWeI/AAAAAAAADrM/N3lvpQksZaI/s320/2.JPG

Change each Operator to: is not equal to and set the desire value.

Change to OR between each criterion.

The result will be:

https://3.bp.blogspot.com/-IDMsaOB4lVc/Vh9Sww_iScI/AAAAAAAADrU/k6VOrdRuv-I/s320/3.JPG

And the query:

select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_TIME_ZONE on SMS_G_System_TIME_ZONE.ResourceID = SMS_R_System.ResourceId where SMS_G_System_TIME_ZONE.StandardDay != 5 or SMS_G_System_TIME_ZONE.StandardDayOfWeek != 0 or SMS_G_System_TIME_ZONE.StandardMonth != 10

Original post: http://idanve.blogspot.co.il/2015/10/query-daylight-saving-time-information.htm