by mtsimmons | Aug 19, 2021 | PowerShell (Modern)
I’ve mentioned previously about How to Create a Random Password using the .NET Framework. That works for Windows Powershell, but it doesn’t work for .NET 5, which is what modern versions of PowerShell use. So what can you do? Well, thankfully it’s...
by mtsimmons | Nov 18, 2019 | PowerShell (Modern), Windows PowerShell (Legacy)
Is Add-Member the most underrated and underappreciated cmdlet in PowerShell? PowerShell is so vast and can manage so many platforms and technologies. It’s easy to get deep in one module or topic. But the core features and language of PowerShell is so often where...
by mtsimmons | Mar 8, 2017 | PowerShell (Modern), Windows PowerShell (Legacy)
I’m sure that you’ve seen plenty of scripts that set a path like “C:\temp” for logs, files, and other outputs. But did you know that it’s actually very easy to add a pop up directory UI in PowerShell that gives a choice of where to save...
by mtsimmons | Jun 5, 2015 | PowerShell (Modern), Windows PowerShell (Legacy)
Have a complaint from a user that a server is sluggish? Maybe you’re just curious if the problem you’re seeing on a server is related to a process consuming a lot of CPU, or you know the CPU is pegged and you want to identify which process is the culprit....
by mtsimmons | May 28, 2015 | PowerShell (Modern), Windows PowerShell (Legacy)
I’ve been rereading the Windows PowerShell Cookbook and I came across a variable I hadn’t noticed before… It turns out to be related to the -match comparison operator. -Match performs a regular expression comparison. A simple way of thinking...
by mtsimmons | Jan 24, 2015 | PowerShell (Modern)
I was going nuts trying to sort an array into a random order. I was hoping for something in PowerShell that would be along the lines of Shuffle() in PHP or Ruby. In fact, after looking at it I was a little surprised at all of the things that an array can’t do in...