If you are like many IT Pros that I know, you often rely on text files in your PowerShell work. How many times have you used a text file of computernames with Get-Content and then piped to other PowerShell commands only to have errors. Text files are convenient, but often messy. Your text file might…
Friday Fun: Creating PowerShell Scripts with PowerShell
Sometimes PowerShell really does seem like magic. Especially when you can use it to handle complicated or tedious tasks, such as creating a PowerShell script. I know many an IT Pro who want to script but without having to actually write a script. Well, I’m not sure that is realistic, but you can get pretty…
Making the Shell Work for You Revisited
The other day, I posted an article about creating your own commands to simplify your life at the PowerShell prompt. Most of the time, creating your own wrapper function for an existing PowerShell command isn’t too difficult. Personally, this is the approach I usually take. But PowerShell is all about building blocks and as you…
PowerShell for the People: Making the shell work for you
Once you have some basic PowerShell experience I think you will begin looking for all sorts of ways to use PowerShell. Although one of the biggest obstacles for many IT Pros is the thought of having to type everything. Certainly, PowerShell has a number of features to mitigate this, often misperceived, burden such as tab…
Friday Fun: Read Me a Story
A few days ago, someone on Twitter humorously lamented the fact that I expected them to actually read a blog post. After the laughter subsided I thought, well why does he have to? Perhaps I can make it easier for him. Plus I needed something fun for today. So I put together a PowerShell function…
Tracking Your Day with PowerShell
Not too long ago, I received an email with a snippet of PowerShell code and a request for assistance. The code snippet used a little .NET code to retrieve the process for the currently active window. The goal was to have a PowerShell script run, keeping track of how long a given window was active….
Friday Fun Text to HTML
I love being able to create HTML documents from PowerShell commands. The Convertto-HTML cmdlet will happily turn any object into an HTML table using whatever properties you specify. Plus you can do all sorts of fancy things such as embedding a style sheet in the header, creating HTML fragments and inserting additional HTML elements. Today’s…
It’s Not About the Bucket
Like the rest of the Internet I’ve been watching the ALS Ice Bucket Challenge. Yes, they are fun to watch. My 17 yr old son and his friend did a great one involving his truck. While noboby had “nominated” me, I had been thinking about pro-actively taking the challenge and calling people out. But the…
A Timely PowerShell Prompt
During the course of writing a few scripts that refresh a specific part of the console, such as the recent Read-Host alternative, I realized that flashing colors wasn’t always necessary. The fact that I could update the same space on the screen meant I could write the same content with minor changes and it would…
More Flashing Fun
I received a lot of interest in my Invoke-Flasher script. One comment I received on Twitter was for a way to use it interactively in a script. In essence, he wanted a flashing Read-Host so I took my original concept and tweaked it until I came up with a Read-Host alternative I simply call Read-Host2….
Look at Me!
Last week I posted some ideas on how to add notifications to your scripts. Those ideas were variations on the old school “Press any key to continue” prompt that I assume many of you are familiar with. Most of those concepts should work for you, but they assume you looking at the PowerShell window. I…
You wanted it…PowerShell Summit Europe
For the longest time members of the PowerShell Community clamored for a European edition of the PowerShell Summit. This is an intense, 3 day conference on all things PowerShell, led by members of the PowerShell community as well as members of the PowerShell team from Microsoft. The conference is intentionally small so that you can…
Press PowerShell Pause to Continue
Everyone once in a while I come across a PowerShell script that behaves like an old-fashioned batch file. Not that there’s anything wrong with that, but often these types of scripts put in a pause at the end of script so you can see that it finished. You might have seen a command like this…
I Wanna Be Like You
Growing up, one of my favorite Disney movies was their adaption of The Jungle Book, and perhaps my favorite scene was King Louie’s production number “I Wanna Be Like You.” I think what really makes this song work is that we all have a desire to be like someone else, perhaps a role model or…
Friday Fun Reverse PowerShell
These Friday Fun posts are not supposed to be practical, yet hopefully still entertaining and educational. Today’s article is no exception but I ‘ll be you’ll try it at least once. And you’ll maybe even learn something about PowerShell that perhaps you didn’t know before. It all starts with a string. We use strings all…