Twitter right from the the command line.
Download the PowerShell Out-Twitter script,
- Save it to a directory in your path
- Edit the file to specify your Twitter user name and password
Inspired By
Jim Truher’s post I love Twitter. He is program manager and one of the co-designers of PowerShell.
He posted a C# cmdlet which wraps the Yedda.Twitter library which is then added as snap-in to the PowerShell environment.
The script is a quick port of the key C# pieces. No compiling, no registry and unfortunately no tab completion with the script.





{ 5 comments… read them below or add one }
When I run your script:
PS>$a = ‘Right from the PowerShell’
PS>$a | out-twitter
I get the error:
Cannot convert value ” ” to type “System.Xml.XmlDocument”. Error: “Root element is missing.”
At \Out-Twitter.ps1:26 char:26
+ ([xml]$reader.ReadToEnd(
Did you edit the script to add your Twitter username and password?
I need to update the script to handle errors being returned.
Yes, I’ve added my username and password and changed the name of the function from Send-TwitterStatus to Out-Twitter. That’s all that I’ve changed in your script.
Ok. If you want you can email me directly finked@hotmail.com.
Change this
([xml]$reader.ReadToEnd()).status
To
$reader.ReadToEnd()
Let’s see what happens.
wow, hook that up with a true random number genarator and the complete works of william shakespeare and ya got a lot of twitter!