I recently had a customer request on how to enumerate maintenance windows within a site. The script was used to provide descriptions that match those created by the ConfigMgr console. The script can also be used as an example of how to convert a SMS_ScheduleToken object into VBScript datetime variant or into a string. The method used to do this was by looking at the system properties for the SMS_ScheduleToken instances to determine what the derived class is.
The script is available on the TechNet Script Center (it was easier than copying all 280 lines up here into a table/textbox ).
This post was contributed by Saud Al-Mishari, a Premier Field Engineer with Microsoft Premier Field Engineering, UK.