July 23rd, 2008 by Jeffery Hicks
In my script and function development, I often add the line $DebugPreference="SilentlyContinue" to the beginning of my code. Throughout the script I add lines using Write-Debug that tell me what the script is doing or the value of a particular variable. This has been very helpful. When I want to see the debug messages, I set $DebugPreference to "Continue" and voila!. In PrimalScript all the messages are written to the debug panel. But I wanted more .  
More »
Posted in Windows PowerShell | No Comments »
July 22nd, 2008 by Ferdinand Rios
A new iPhone app has just been released that allows iPhone and iPod touch users to post blog entries to their WordPress based blog sites.…  
More »
Posted in 20,000 feet, Gadgets, General | No Comments »
July 22nd, 2008 by Jeffery Hicks
In the Pixar film Cars, Mater demonstrates to Lightning McQueen how to drive backwards. Lightning is astounded. Mater explains, "Don't need to know where I'm going as long as I know where I've been." Probably not the exact quote but the point is if you know what you've done or where you've been it makes it very easy to know where you're going or what to do next. In PowerShell you can take advantage of the shell's history objects to speed up what you want to do next.  
More »
Posted in Windows PowerShell | No Comments »
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 »
Posted in Windows PowerShell | No Comments »
July 21st, 2008 by Jeffery Hicks
Registration for the last online training course, possibly for the rest of 2008, ends this Wednesday 7/23/2008 at 12:00PM PST.  
More »
Posted in Books and Training, Windows PowerShell | No Comments »
July 21st, 2008 by Jeffery Hicks
We've posted a sample chapter for Managing Active Directory with Windows PowerShell: TFM. There is also a Table of Contents if you want to see what how I've been spending my time.  
More »
Posted in Books and Training, Windows PowerShell | 1 Comment »
July 20th, 2008 by Jeffery Hicks
In the online PowerShell class I've been doing this week we've been discussing error handling. I explained that the built-in $error variable is an array that stores recent PowerShell exceptions. Here's a quick list of fun things you can do with an error object.  
More »
Posted in Windows PowerShell | No Comments »
July 18th, 2008 by Jeffery Hicks
You would think that by now Windows and Windows applications would be much better about cleaning up temporary files. But no. It is amazing how many files I still see in my %TEMP% directory. I've always operated under the assumption that any file in %TEMP% that was created or earlier than the time I last booted up is fair game for deletion. I finally got around to using PowerShell for this management task.  
More »
Posted in Windows PowerShell | 2 Comments »