I recently updated my Windows 10 systems to the 1903 release. One of the reasons is that I wanted to try out the new Windows Terminal preview. You can find it in the Windows Store. This is bleeding edge stuff and far from complete but promises to be a great addition. Now you will be…
Category: Scripting
Capturing Names with PowerShell and Regular Expressions
As you continue to learn and embrace PowerShell, you will eventually meet regular expressions. Hopefully many of you already have some fundamental knowledge. if not, the first place to start is by reading the help topic, about_regular_expressions In this article, I’m gong to introduce you to an advanced regular expression topic – named captures. I’ll…
More PowerShell Adventures in Cleaning Your Path
A few days ago, I posted an article that demonstrated a number of PowerShell techniques and concepts that you could use to clear out obsolete locations in your %PATH% environment variable. For those of you new to my blog I want to make sure you understand that I often use a scenario, such as this…
Going Down the Right %PATH% with PowerShell
I trust that most of you are aware that the reason it is often easy to run command and programs in Windows, especially items from the command prompt, is thanks to a system environment variable called PATH. When you tell Windows to run a command, without using the complete path to the program, Windows looks…
PowerShell Format Files the Easy Way
Whenever I teach or present on PowerShell scripting, I’m always talking about writing objects to the pipeline. Most of the time you can simply let PowerShell format and display output of your command to the best of its ability. However, you may wish to take matters into your own hands and create custom output. For…
Creating More Git PowerShell Tools
I have received a tremendous amount of interest in my recent articles on creating a git sizing tool using PowerShell. Many of you were savvy enough to realize the journey I was describing was just as important as the destination. With that in mind, I decided to revisit another PowerShell and git-related project that I…
Friday Fun with a Cross-Platform PowerShell Prompt
This year is turning out to be all things cross-platform for me. Continuing this line of discussion I have something fun and simple today. A PowerShell prompt function that will work cross-platform and provide some meaningful information in what I think is a elegant manner. You may not need the function, but you might want…
Building More PowerShell Functions
In a recent post I discussed the the process you might go through in developing a PowerShell function. By the end, I not only had a new tool for my PowerShell toolbox, but I had a function outline that I could re-use. If you read the previous article then you should recognize the idea of…
Building a PowerShell Process Memory Tool
This week I’ve been testing out a new browser, Brave, as a possible replacement for Firefox. One of the reasons I switched to Firefox from Chrome was performance and better resource utilization. Brave may now be a better choice, but that’s not what this article is about. In order to assess resource utilization I turned…
The Ultimate PowerShell Telemetry Prompt
Well, I knew I wouldn’t be satisfied. The other day I shared a PowerShell prompt function that could display telemetry like information for a few remote servers. One of the drawbacks was the limited amount of information I could display. I’ve revised that function and have a new version that displays additional information via a…
My Telemetry PowerShell Prompt Function
I’ve enjoyed building these PowerShell prompt functions. Because performance is critical, it has forced me to create efficient code. For example, I’ve been using Get-CimInstance to retrieve select properties from certain classes. Because I know in advance what properties I need, I can tell Get-Ciminstance to only get and return those properties. With today’s version,…
A PowerShell Up/Down Prompt
It appears many of you are taken with the possibilities of PowerShell prompt functions. In previous posts, I alluded to the fact that you could do just about anything in a prompt function. Today I have an example of what I am talking about. The challenging part of creating a prompt function that does more…
Your Christmas PowerShell Prompt
Continuing my fun with PowerShell prompts and because we are in the Christmas season. I’m bringing back my Christmas countdown prompt. I have updated so it should work in both the traditional console and PowerShell ISE. The prompt displays a randomly colorized countdown message with some random decorations. You can find the updated code as…
More Fun with PowerShell Thrillers
Last week I posted a Friday Fun article about using PowerShell to create a synopsis for a hypothetical thriller novel. Naturally I wasn’t satisfied to leave it at that. Don’t get me wrong, it was a good start. But I needed to take the next logical step. I had a script, but that meant having…
Friday Fun: PowerShell Thriller Revisited
A number of years ago I shared a fun PowerShell script that generated a description of a new thriller you might find in the action thriller section of your local book store. I modeled it after the works of authors like Vince Flynn, Ben Coes and James Rollins. I’m a big fan and of these…