For my readers who are just discovering my Friday posts, let me remind you that these are not necessarily practical, production worthy PowerShell scripts and functions. They are meant to be fun, yet educational. For example, in today’s Friday Fun I have a function that takes string input and writes colored output to the console….
We Pause a Moment
Most of the time when running a PowerShell script or series of commands you want to blast your way through. But there might be times where you want to pause script execution. Perhaps to display an informational message or to simply pace execution. In my work as a trainer and speaker I often use the…
Friday Fun – New Thriller
I read a lot of thrillers by authors like James Rollins, Jeff Long, Douglas Preston and Lincoln Childs. Certainly not high-brow literature, but generally well written and often a lot of fun. Of course with any fiction genre, there are certain thematic paradigms that must be followed, almost as if by recipe. Thus was born…
Convert History to Script
Whenever I teach or speak about PowerShell, a recurring mantra is that there is no difference between running a PowerShell script and executing commands interactively in the shell, except that it saves you typing. You can create a PowerShell script by simply copying and pasting commands from the shell into a .PS1 text file. This…
More WMI Dates – Win32Product InstallDate
I’ve written in the past about converting obtuse WMI datetime formats into more user friendly formats. The other day via Twitter I got a question about the InstallDate property that comes from the Win32_Product class. This property has a different format, than what I’ve written about previously. And while I think the format is easy…
Convert to Title Case
After a long holiday break, some travel and a few training classes its time to get back in the swing of things. Today I have a relatively simple function, that if nothing else demonstrates how to use object methods. The challenge is to take a string of text and convert it into title case; so…
Join Me in Orlando
I will be presenting 3 sessions at Techmentor Orlando 2011. The conference runs March 14-18, 2011 at the Disney Yacht Club. My sessions are all on Wednesday March 16. In addition to all the other fabulous material at the conference I will be presenting the following:
Out-CompressedFile
I’m not sure where this idea came from, but I thought it might be nice to redirect output to a compressed text file. I know disk space is cheap these days but perhaps you’re running PowerShell 2.0 on an older platform and you want to save output from a command that will generate a ton…
TechEd Berlin Paradigm Shift Demos
I had a great time in Berlin at TechEd and want to thank everybody who came to my presentation. I hope you found it valuable and worth your time. As promised, you can download my demo files here. The .txt files are my demo files which are really just a list of PowerShell commands. They…
Friday Fun Quote of the Day
For this week’s Friday Fun post, I have another idea on how to brighten your PowerShell console. The concept of a message of the day or quote of the day in computing goes way back to the dark ages (ie before PowerShell). I thought it might be fun to see what we could do with…
Friday Fun – The Kitchen Sink Prompt
On my last Friday Fun post on PowerShell prompts, I got a terrific comment from Bart Vandyck about his prompt which has just about everything you would want. I too have a “kitchen sink” prompt, that is to say, one with the proverbial “everything but the kitchen sink”. Or you might consider this an extreme…
Friday Fun – More Prompts
Not too long ago I offered up a tasting of PowerShell prompts 3 ways. My first offering were variations on displaying the current date and time. But a PowerShell prompt can do much more. For today’s Friday Fun I present a duo of of calculating prompts.
Export Registry
Over the last week or so I’ve posted some functions for testing whether a given registry item exists or not, or even validating its value. To round this out, today I have an advanced function that makes it easier to export parts of the registry on the local computer.
Test Registry Item Revisited
I got some nice feedback on my original Test-RegistryItem function. I had been mulling some enhancements anyway and now have a more robust version that looks at individual values, accepts pipelined input and more The new version now lets you test if a given registry item exists as well as if the value meets some…
Custom Prompts 3 Ways
Recently, a number of PowerShell MVPs were having a discussion about the transcript feature in Windows PowerShell. One comment that arose was a need to see how long tasks have run or otherwise provide some sort of date time information. One solution is to use a customized PowerShell prompt and provide the information yourself. Here…