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…
ThinkStation P340 Tiny – A First Look
Many of you know that I am a big fan of Lenovo products. I belong to a group sponsored by Lenovo called Lenovo Insiders that spreads the word about Lenovo. However, I never pull any punches and have never been reluctant to be brutally honest when necessary. But none of that really matters today as…
Open Up Wide with PowerShell
A few weeks ago, an Iron Scripter PowerShell scripting challenge was posted. The challenge involved wide directory listings. Which always makes me think “open wide”, which leads me to “Open Up Wide” by Chase. (I used to play trumpet and Chase was THE band back in the day). Anyway, solving the challenge most likely involves…
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…
Friday Fun: Back to School with PowerShell
For today’s fun with PowerShell, I thought I’d share my solutions for a recent Iron Scripter challenge. If you aren’t familiar with these challenges, and you should be, they are designed to test your PowerShell skills and hopefully help you learn something new. There are challenges for all skill levels and you can tackle them…
Taking Issue with PowerShell
Do you have a moment? I think it’s time we had a little chat. No, no…you have done anything wrong. In fact, what I really need is your help. Because you are a member of the global PowerShell community, I felt I could talk to you. You do enjoy being a member of the community,…
Updated PowerShell Tools
I’ve released a new version of my popular PSScriptTools module, which you can install from the PowerShell Gallery. The module is collection of commands and tools that I use in my scripting and day-to-day work at a PowerShell console. Many of the commands run in Windows PowerShell and PowerShell 7, even on non-Windows systems. I…
Friday Fun – A PowerShell Nonsense Challenge
Today I thought I’d share my PowerShell solution to a recent Iron Scripter challenge. The challenge was to create PowerShell code that would create nonsense documents, with a goal of creating 10 sample files filled with gibberish. Yes, other than maybe wanting some test files to work with, on its face the challenge appears pointless. …