I hope you’ve been enjoying the last few posts on working with PSDrives. To round out the set, I thought I’d remind you of a command in the PSScriptTools module that I use often, especially when teaching a live class or presenting at a conference. As you’ve seen, I use PSDrives as shortcuts to commonly…
Extending PowerShell PSDrives
Yesterday I shared some PowerShell code I use to managing my PSDrive assignments. My code works for me in my environment. But that doesn’t mean it is necessarily right for you and your environment. There are plenty of ways to use PowerShell to achieve the same results as my code. This is something you should…
Fun with Mapping PowerShell Drives
Because I spend my day working from a PowerShell prompt, I rely heavily on PSDrives to quickly access files and folders. And because I am mobile, I might be working at my desk in my home office, or I might be on the road with my trusty Thinkpad. Of course, this means, I want an…
Cleaning Up PowerShell Jobs
I am a heavy user of PowerShell jobs. Not only background jobs but also scheduled jobs. They are a critical element in my daily workflow. Every time a job runs, especially scheduled jobs, a job artifact remains which you can see using Get-Job. For scheduled jobs, I try to keep this to a minimum by…
Getting CIMInstance by Path
I am a member of the PowerShell Cmdlet Working Group. We’ve been looking into this issue and it is an intriguing one. Enough so that I spent some time looking into it and writing up some test code. If you work with WMI/CIM this might be of interest to you. Personally, I never have had…
Doing More with $MyInvocation
Not that long ago someone made a comment to me on Twitter about something I had shared related to PowerShell. He wanted to know more about the $MyInvocation variable. This is something that isn’t well documented, yet can be very useful in your PowerShell scripting. Let’s take a look at it in a bit more…
Using the PowerShell ISE as a Remote Management Console
Way back before the days of PowerShell Core, or even VS Code for that matter, the PowerShell ISE was the center of my PowerShell world. I spent a lot of time finding ways to make it easier for me to use and to push it to its limits. Naturally, the PowerShell ISE doesn’t play much…
Searching for PowerShell with CIM
Yesterday I shared a script that you could use to inventory systems for Windows PowerShell and PowerShell 7 installations. This should work for most people who install PowerShell 7 with the provided installer. But, as has been pointed out more than once to me, this won’t detect any side-loaded or out-of-band installations. I made reference…
Revisiting PowerShell Version Inventory
In the past, I’ve shared a variety of PowerShell approaches that you can use to inventory what versions of PowerShell are installed. But I think I now have the best approach short of searching the hard drive for powershell.exe and pwsh.exe, which I suppose is still a possibility and something I should write. Instead, I’m…
Filtering for Unique Objects in PowerShell
A few weeks ago my friend, Gladys Kravitz, was lamenting about a challenge related to filtering for unique objects. PowerShell has a Get-Unique cmdlet, and Select-Object has a -Unique parameter, but these options are limited. On one hand, I’d say most things we manage with PowerShell are guaranteed to be unique. Objects might have a…
Living the Ultra-Wide Life
Several weeks ago, I made the jump into the world of ultra-wide monitors. I held off on writing about my experience until I had lived with it for a bit. The bottom line is that I have adjusted and can’t imagine going back. Here’s what happened. For many years, I happily lived with 2 monitors….
Hiding TaskBar Search with PowerShell
Yesterday I shared a few PowerShell functions for configuring the Windows 10 taskbar to auto-hide. This works great in my virtual desktop when recording my Pluralsight courses. But even when hidden I would still get an annoying white sliver from the search box. So I got rid of that as well. Here are some PowerShell…
Managing the Windows 10 Taskbar with PowerShell
When I’m working on a Pluralsight course, I tend to setup a virtual machine for recording. Although, lately I’ve been trying with Windows 10 Sandbox. This is handy when all I need is a Windows 10 desktop. When I setup the system, I have particular settings I need to configure. Naturally I use a PowerShell…
Custom CSV Import with PowerShell
I am always looking for opportunities to use PowerShell in a way that adds value to my work. And hopefully yours. This is one of the reasons it is worth the time and effort to learn PowerShell. It can be used in so many ways beyond the out-of-the-box commands. Once you understand the PowerShell language…
Friday Fun – Custom Grouping with PowerShell
The other day I was answering a question in the PowerShell Facebook group. This person was getting data from Active Directory and trying to organize the results in a way that met his business requirements. My suggestion was to use Group-Object and a custom grouping property. I am assuming you are familiar with Group-Object. You…