Last week I was seeing what else I could add to my Windows Terminal setup. If you can launch a console from the command line, you can probably create a Windows Terminal profile for it. Recently, I’ve added Ruby and Python to my desktop, both of which have interactive consoles. I thought, “Why not add…
Category: PowerShell
Answering the PowerShell Linking Challenge
A few weeks ago, the Iron Scripter challenge was to move files meeting some criteria to a new location and leave a link behind. As I’ve written before, these challenges are a great way to test your PowerShell skills and stretch yourself. This challenge has a number of moving parts. Often with PowerShell some of…
Measuring PowerShell Profile Performance
Today’s topic is one of those things that I don’t know why I’ve never addressed before. Well, I have for myself in a manual process. Hopefully you’ll find it useful. As you probably know, PowerShell uses a set of profile scripts. These scripts have hard-coded paths and PowerShell runs them in order from broadest to…
Color My PowerShell World
I readily admit that I spend a great deal of my day at a PowerShell prompt. My day is very much run from the command-line, and has been for quite some time. This used to be a drab, gray existence. But I’ve been finding ways to liven things up. Here’s one way. The PSScriptTools module…
Answering the PowerShell Registered User Challenge
A few weeks ago, an Iron Scripter PowerShell challenge was issued. This was a beginner to intermediate level challenge to get and set the registered user and/or organization values. These challenges, and solutions such as mine, aren’t intended to production-ready tools. Instead, you should use them as learning vehicles to advance your PowerShell scripting skills….
Better Performance Counters with PowerShell
I wanted to tell you about another addition to the latest release of the PSScriptTools module. This is something I’ve written about before but I decided to add the function to the module. I hope you find it a much easier way to work with performance counters. And it works in Windows PowerShell and PowerShell…
Tracing PowerShell with WPF
Back in my VBScript days, I had a script that would use Internet Explorer as a trace window. My script could run and messages would be written to an IE window. This was a handy way of separating debug or trace messages from the command output. When PowerShell came along I revised it. But IE…
Parsing ssh Known Hosts with PowerShell and Regular Expressions
Lately, I’ve been spending time learning more about ssh. Sadly, I’ve rarely had a need to learn and use ssh. But of course, with PowerShell 7 and ssh-based remoting, it is time to up my game. I’ve started deploying the ssh server component to my Windows test servers (I’ll write about that another day) and…
Finding Zombie Files with PowerShell
Since this is Halloween weekend in the United States, I thought I’d offer up a PowerShell solution to a scary task – finding zombie files. Ok, maybe these aren’t really living dead files, but rather files with a 0-byte length. It is certainly possible that you may intentionally want a 0 length file. But perhaps…
Distinguished Parsing with PowerShell and Regex
The other day I’m chatting with my friend Gladys Kravitz about Active Directory and she makes an off-hand remark about parsing out organizational unit names from a distinguished name. On one hand, this is a pretty simple task, assuming a proper distinguished name from the Active Directory cmdlets. All you really need to do is…
Discovering Custom PowerShell Views
The other day I shared some ideas on why and how you might want to build a custom format view in PowerShell. As I mentioned in that article, PowerShell ships with a number of custom views for different types of objects. How did I know that view existed? What other views exist that I don’t…
Easy PowerShell Custom Formatting
One of the features I truly enjoy about PowerShell, is the ability to have it present information that I need in a form that I want. Here’s a good example. Running Get-Process is simple enough and the output is pretty complete. But one thing that would make it better for me, is that sometimes I…
PowerShell Color Combos
A lot of my PowerShell work lately has involved color. I find myself using ANSI escape sequences quite often. I’m also playing with different color schemes in Windows Terminal. And I still on occasion find myself using Write-Host to display colorized messages. What has gotten trickier is that Windows Terminal schemes can redefine colors. What…
Answering the WSMan PowerShell Challenge
Today, I thought I’d share my solution to a recent Iron Scripter challenge. I thought this was a fascinating task and one with a practical result. I’d encourage you to try your hand at the challenge and come back later to see how I tackled it. The challenge is not only a good test of…
Active Directory Objects and the PowerShell Pipeline
This article is something I’ve been meaning to write for sometime. As often as I tell people PowerShell is easy to use once you understand its core concepts, that isn’t always the case. This is a problem my friend Gladys Kravitz brought to my attention some time ago. Like her, you probably have written a…