The other day I was helping a friend sort out some module-related questions. While helping him, I realized his questions and problems were not unique. Now that many of us are running Windows PowerShell 7 side-by-side, what are the implications when it comes to using PowerShell modules? What are the potential “gotchas”? And what can…
Tag: PowerShell
Answering the CIM Directory Challenge
The last Iron Scripter challenge of 2020 was a big one. If you didn’t get a chance to work on it, see what you can come up with then come back to see my approach. As with many of the challenges, the goal isn’t to produce a production-ready PowerShell tool, but rather to push the…
Get Windows Terminal KeyBindings
As many of you know I am a big fan and daily user of Windows Terminal. So much so, that I wrote a PowerShell module called WTToolBox that you can install from the PowerShell Gallery. I’ve pushed a new version that does a better of getting key bindings. Windows Terminal makes use of a number…
Deploy OpenSSH Server to Windows 10
PowerShell 7 offers a number of compelling reasons to adopt it. One of the best is support for SSH as a PowerShell remoting protocol. Unfortunately, this is not a topic that typically comes up for Windows-centric IT Pros. I know this is definitely true in my case, and a deficiency I have been working on….
Convert to Local Time with PowerShell
As some of you know, I host a monthly online Twitter chat on the first Friday of every month using the #PSTweetChat tag (although the January 2021 chat will be on 8 January.) We get together and chat about all things PowerShell at 1:00PM Eastern Time. The challenge for the rest of the world is…
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…
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…