Over the weekend I received a nice comment from a reader who came across an old post of mine on turning an object into a hash table. He wanted to add a comment but my blog closes comments after a period of time. But I thought it was worth sharing, especially for those of you…
Tag: PowerShell
Friday Fun – Does Anyone Really Know What Day It Is?
This week’s Friday Fun I think epitomizes how much I think about PowerShell. But I also think it will serve as a useful learning device if not something you might actually want to use. For some reason, I thought it would be useful to quickly display a monthly calendar in PowerShell. Sure, I could click…
More PowerShell Toolmaking Fun
I am having so much fun making my own PowerShell tools that I just can’t stop. I’ve been using my Get-Commandmetadata function that I wrote about a few weeks ago. A driving force in all of this is to have a toolset that I can use efficiently from the console. Or to put it in…
Friday Fun – A Popup Alternative
In the past I’ve written and presented about different ways to add graphical elements to your PowerShell scripts that don’t rely on Windows Forms or WPF. There’s nothing wrong with those techniques, but they certainly require some expertise and depending on your situation may be overkill. So let’s have some fun today and see how…
Creating Your Own PowerShell Command
Last week, I posted a PowerShell function that you could use as an accelerator to create your own PowerShell tools. My tool takes command metadata from an existing PowerShell cmdlet and gives you the structure to create your own tool wrapped around what is in essence a proxy function. The advantage, besides saving a lot…
Using Optimized Text Files in PowerShell
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…
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…