This isn't a scripting but rather a developer topic. I would start with the
documentation. If you have further questions, I recommend an appropriate developer forum.
Microsoft is conducting an online survey to understand your opinion of the Technet Web site. If you choose to participate, the online survey will be presented to you when you leave the Technet Web site.