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…
Tag: PowerShell
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…
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…
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…
PowerShell Event Log Mining
The other day someone who is learning PowerShell reached out to me with a problem. He couldn’t understand why the relatively simple PowerShell expression to pull information from the System event log wasn’t working. He wasn’t seeing errors, but he also wasn’t seeing the events he was expecting. Searching event logs with PowerShell is a…
PowerShell Tough Love
The other day I was helping Gladys Kravitz on her transition to VS Code. Like many of you, she has been using the PowerShell ISE for years and has a deeply ingrained workflow. I’ll be the first to admit that making the transition to VS Code is not easy. I remember when I made the…
Friday Fun: Counting Down Events with PowerShell
We just finished a very successful virtual edition of the PowerShell+DevOps Global Summit. We lost our 2020 event to the pandemic but fortunately, the people at The DevOps Collective were able to pull together a fantastic virtual event. There were as many virtual attendees as we normally have at the in person event. But of…
A Better Way to Manage PowerShell Functions
Like many of you, I write a lot of PowerShell code. Much of it I use on a daily basis since I essentially spend my day at a PowerShell prompt. Also like many of you, I often assemble functions into a module. A module makes it easier to load the functions I need, and also…
Unlocking PowerShell Secrets
So I’ve been kicking the tires and trying to do more with the Secrets Management modules from Microsoft, now that they are out of pre-release status. You can install the Microsoft.PowerShell.SecretStore and Microsoft.PowerShell.SecretManagement modules, you’ll need both, from the PowerShell Gallery. You can find extension modules that build on the Microsoft modules for working with…
Building a PowerShell Process Detection Tool
I spend my entire working day in a PowerShell prompt. It is often a combination of Windows PowerShell and PowerShell 7. Sometimes I’m in a session with a loaded profile, sometimes not. Sometimes I have a PowerShell 7 Preview session running. And then there are the scheduled jobs which also run PowerShell. Over the years,…
More About PowerShell PSDefaultParameterValues
Last week I shared a little nugget about making PowerShell life easier by using the built-in variable, $PSDefaultParameterValues. This is a special hashtable where you can define default parameter values for any PowerShell command. This means any PowerShell script or function that has defined parameters AND uses [cmdletbinding()]. If you have a simple function that…
Active Directory Group Reporting
I’ve pushed v1.2.0 of the ADReportingTools module to the PowerShell Gallery. The release adds the missing help for Get-ADComputerReport. I’ve also added better documentation and information in warning messages when running commands in the PowerShell ISE or VS Code. To re-iterate, the module is designed to be run from a PowerShell console host. It is…
Active Directory Reporting Tools Released
Over the weekend, I published the 1.0 version of the ADReportingTools module to the PowerShell Gallery. I first wrote about this module a few weeks ago. I’ve made a number of changes since then and felt the module was ready for an official release. I’m continuing to add new features so you’ll want to keep…
Answering the PowerShell Export Challenge
Last month, the Iron Scripter Chairman put out a rather large and complex challenge. The basic premise of the challenge was to export a PowerShell session to a file, and then import it in later PowerShell session. In essence, the save the working state of your PowerShell session. This would include items such as defined…