The 2011 Scripting Games Advanced Event 6: Use PowerShell to Get Twitter Names from a Web Page


2011 Scripting Games badge

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

Due Date

4/18/2011 12:15 AM

Event scenario

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.

Image of networking page

Sample text file output from the previous page is shown here.

Image of text file

Design points

  • 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 Therefore, the Twitter username is ScriptingGuys, not or @ScriptingGuys.
  • Extra points for reusable code
  • Extra points for adding useful Help information, complete with sample usage

2011 Scripting Games links

2011 Scripting Games: All Links on One Page

Submit your scripts on PoshCode

Support our Sponsors!

I invite you to follow me on Twitter and Facebook. If you have any questions, send email to me at, 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


Comments are closed.