The 2011 Scripting Games Advanced Event 6: Use PowerShell to Get Twitter Names from a Web Page
Summary: Advanced Event 6 in 2011 Scripting Games uses Windows PowerShell to get Twitter names from a web page.
About this event
Date of Event
4/11/2011 12:15 AM
4/18/2011 12:15 AM
You are getting ready to attend a SQL Saturday event in your area. Prior to the event, you want to ensure that you know who is attending the event so you can leverage your networking opportunities. You discover the networking page and see that it has everyone’s Twitter username listed. After a bit of thought, you decide that it would be cool to have a list of everyone’s Twitter usernames in a text file. To do this, you need to write a script to obtain only the Twitter usernames from the networking site, and write the names to a text file. A sample networking page from one of these events is shown in the following image.
Sample text file output from the previous page is shown here.
- For the purposes of this exercise, use the Columbia, South Carolina networking page for the SQL Saturday #70 (March 19, 2011) event. The URL for the networking page of this event is:
- If you use a temporary file during the process of obtaining Twitter usernames from the networking page, delete the file prior to completing the script.
- When you are obtaining the Twitter usernames, do not include an ampersand or twitter.com. Therefore, the Twitter username is ScriptingGuys, not twitter.com/scriptingguys or @ScriptingGuys.
- Extra points for reusable code
- Extra points for adding useful Help information, complete with sample usage
2011 Scripting Games links
I invite you to follow me on Twitter and Facebook. If you have any questions, send email to me at email@example.com, or post your questions on the Official Scripting Guys Forum. Good luck as you compete in this year’s Scripting Games. We wish you well.
Ed Wilson, Microsoft Scripting Guy