I have been an IT Pro for almost 30 years. For the most part that has meant working in a Microsoft Windows environment. I remember dabbling with Linux when it first hit the scene. I found it intriguing but never had a need to really learn and use it. Over the years, I’ve continued to…
Friday Fun PowerShell ASCII Art
Today’s post is definitely on the fun side. In fact, I apologize in advance for the afternoon you are about to blow playing with this code. Those of you of a certain age will recall dial up modems and bulletin boards. Part of the experience was visual. Board operators often displayed the name of their…
Cross Platform PowerShell Profiles with Windows Terminal
Earlier this week I shared my techniques for creating a Windows Terminal profile that would open a remote PowerShell session. But with PowerShell 7, I can also connect to non-Windows machines using SSH. So why not extend my code to allow connecting to a Linux box? Before you try anything that I’m going to share,…
PowerShell Remoting Profiles with Windows Terminal
I have jumped in the deep end and fully committed to Windows Terminal as my default PowerShell environment. I love having one interface with tabs for different terminal profiles. Windows Terminal makes it easy for me to have tabs open to PowerShell 7, Windows PowerShell, an Ubuntu instance or even a PowerShell session with no…
A New PowerShell PSBlogWeek is Coming
If you’ve been on Twitter for a while, you may have seen a PSBlogWeek event in the past. This is an online event with a coordinated set of blog posts from a group of bloggers and community members all centered on a given topic. This idea is to share a lot of information on a…
Learn More about PowerShell and Regular Expressions
For many Windows-oriented IT Pros, and I used to be one of them, regular expressions was an arcane topic that was too hard to learn. And we never really had a compelling need to learn because we were busy clicky-clicking everything. Then came PowerShell and we discovered, or maybe rediscovered, a whole new way to…
Adding a PowerShell Profile Calendar
Some of you may be aware of my PSCalendar module which you can install from the PowerShell Gallery. The module contains commands that you can use to display a console-based calendar. The calendar commands let you specify days to highlight. These might be days with special events or appointments. I typically use the Show-Calendar command…
Better Event Logs with PowerShell
Because I don’t work in a corporate environment, I don’t always see opportunities where PowerShell can make your life better as an IT professional. I have a friend — let’s call her Gladys Kravitz. Gladys and I were chatting and she mentioned how tricky it is to pull information out of Windows event logs. If…
Creating Linked HTML with PowerShell
Today’s post is about a niche problem or something that maybe you never considered before. And while I will share a finished PowerShell function, you may want to create your own tooling based on the techniques and concepts. The problem begins with a command like this: Get-HotFix -ComputerName $env:computername | Sort-Object Description,InstalledOn -Descending | Select-Object…
Friday Fun: Taking a Shortcut Path in Your PowerShell Prompt
To kick off the new year I thought I’d take a shortcut and reclaim some wasted space in my PowerShell prompt. I know I run into this issue during classes and conferences. Perhaps you encounter it as well. You are in in the PowerShell console and have ended up in a deep directory structure so…
Friday Fun: Thank God It’s a PowerShell Friday
Well here we are at the last Friday of the year. In fact , the last Friday of the decade! On this auspicious occasion, let’s have some PowerShell fun and celebrate Friday. No matter what you call it, I’m assuming Friday is your last typical workday and something we look forward to. However, the name…
Testing for PowerShell in Windows Terminal
I have pretty much migrated to Windows Terminal as my primary PowerShell interface. Even though my daily session is PowerShell 7 I love that I can open up other sessions in the same application. yes, I know there are still limitations and that many of you prefer ConEmu. And that’s fine. Windows Terminal suits my…
Converting Lexical Timespans with PowerShell
I’ve been working on a few scripting projects and the data I’m working with contains lexical timespans. Say what? You have probably seen these things. This is a string like P0DT0H0M47S to represents a timespan. They aren’t difficult for humans to read. This one says “0 days 0 hours 0 minutes 47 seconds”. The format…
Managing My PowerShell Backup Files
Last month I started a project to begin backing up critical folders. This backup process is nothing more than another restore option should I need it. Still, it has been running for over a month and I now have a number of full backup files. I don’t need to keep all of them. If I…
PowerShell Paths and Errors
As you write PowerShell scripts, it is important that you include error handling. Most of the time, this involves the use of Try/Catch statements. The tricky thing with Try/Catch is that you can only catch a terminating exception. There are a few cmdlets that by design will throw a terminating exception. But you have no…