Startsidan  ▸  Texter  ▸  Teknikblogg

Anders Hesselbom

Programmerare, skeptiker, sekulärhumanist, antirasist.
Författare till bok om C64 och senbliven lantis.
Röstar pirat.

Checking a twitter feed using PowerShell


To check a twitter feed using PowerShell, you must have an URL to an XML feed (probably RSS). Open the web site of the account you’re interested in ( and find the RSS link. Mine is

You can load the URL into a variable like so:


Then, the Net assembly must be loaded. Use the Load function of the System.Reflection.Assembly class (without inserting any Enter strokes).

Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")

If you’re not sure about public key token or version, check you assembly folder in your Windows installation folder. Next, you create a web client from the assembly that you just loaded.

$wcli=New-Object System.Net.WebClient

Use the OpenRead function of the web client to acquire a web stream.


Use the stream object to create a stream reader.

$r=New-Object System.IO.StreamReader($s)

To save the result stream data in a variable, call the ReadToEnd function of the reader. You then have to close the reader and destroy the web client.


You can just type the name of the variable to see its content.


You should now see my twitter feed!

Categories: PowerShell

Tags: PowerShell

One response to “Checking a twitter feed using PowerShell”

  1. […] This post was mentioned on Twitter by Anders Hesselbom, Sean Kearney. Sean Kearney said: RT @ahesselbom: New blog post: Checking a twitter feed using PowerShell […]

Leave a Reply

Your email address will not be published. Required fields are marked *

En kopp kaffe!

Bjud mig på en kopp kaffe (20:-) som tack för bra innehåll!

Bjud på en kopp kaffe!


Kontaktuppgifter, med mera, finns här.

Följ mig

Twitter Instagram
GitHub RSS

Public Service

Folkbildning om public service.

Hem   |   |   |   |   Filmtips