Monday, July 21st, 2008 by Jeffery Hicks
Hal Rottenberg has put together a very nice set of functions for exporting and importing PSCredential to a file. The export function takes a PSCredential and serializes it to an XML file. The corresponding import function reconstitutes the PSCredential to an object that you can use. Now before you start freaking out about security, the xml file can only be used by the same user account that created it.
What I like about this is that I can now have multiple credentials easily stored for different computers. I'm no longer tied to using one credential.  
More »
Tags: Export-cliXML, Get-Credential, Import-cliXML, powershell, PSCredential, scripting, XML
Posted in Windows PowerShell | No Comments »
Friday, June 27th, 2008 by Jeffery Hicks
Since I find myself spending so much time in a PowerShell console, I'm always trying to find ways to stay. I recently posted my version of a PowerShell script to send a message to Twitter. But that's only half the story. If I want to check for recent tweets I have to switch to Firefox and the use the Twitterfox addon. But since everything in Twitter comes via a web page or RSS feed, it is pretty simple to use the System.Net.Webclient class in a PowerShell script to get what I want. To that end I wrote a function called Get-Tweet to return recent tweets.  
More »
Tags: function, powershell, RSS, Twitter, WebClient, XML
Posted in General, Windows PowerShell | No Comments »