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…
Make Defaults a Way of Life
A quick post today to remind you of a way to make PowerShell even easier to use. PowerShell cmdlets and functions obviously help us get a lot done, and most commands offer a number of parameters to customize what needs to be done. Unless you love typing, you probably would like an even easier way…
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…
Cleaning with PowerShell Revisited
Springtime is approaching in North America. Where I live, the snow has finally melted and we have blue skies with warmer temperatures. Of course, this means Spring Cleaning. Time to clear out the winter debris and spruce up the house. For me, this is also a good time for some computing housecleaning as well. I…
Solving Another PowerShell Math Challenge
Last month, the Iron Scripter Chairman posted a “fun” PowerShell scripting challenge. Actually, a few math-related challenges . As with all these challenges, the techniques and concepts you use to solve the challenge are more important than the result itself. Here’s how I approached the problems. Problem #1 The first challenge was to take a…
Better Active Directory Reporting with PowerShell
I’ve been using Active Directory for over 20 years. I was even one of the first 2000 IT Pros worldwide to obtain an MCSE on Windows 2000. Over the years, I’ve used a variety of management tools from command-line tools, to VBScript, and eventually PowerShell. Like many of you, I’ve used the ActiveDirectory module from…
PowerShell Property Sets to the Rescue
if you are like me and spend most of your day at a PowerShell prompt, anything that simplifies that process is worth the time to learn or set up. Even though I am a decent typist, I am more than happy to find ways to type less at a PowerShell prompt. I already take advantage…