This category contains my articles that, in one way or another, include the usage of PowerShell. That’s a lot of posts – such a large share of what I write about contains different configuration steps, and those are most often easiest to do with PowerShell.
While most of the time there’s a configuration option available using the GUI as well, creating a reusable and debuggable script is generally speaking the preferred option for me.
But what is PowerShell, exactly? If you’re reading this blog, you probably already know I’m not the biggest fan of reinventing the wheel – so I’m not going to reinvent the definition, either. The following is adapted from Microsoft’s documentation for PowerShell:
Windows PowerShell (PowerShell, or PoSh for short) is a Windows command-line shell that includes an interactive prompt and a scripting environment that can be used independently or in combination.
Unlike most shells, which accept and return text, Windows PowerShell is built on top of the .NET Framework common language runtime (CLR) and the .NET Framework, and accepts and returns .NET Framework objects. This makes it a powerful tool for most configuration and automation tasks.
Windows PowerShell introduces the concept of a cmdlet (pronounced “command-let”), a simple, single-function command-line tool built into the shell. You can use each cmdlet separately, but their power is realized when you use these simple tools in combination to perform complex tasks. Straight out of the box there’s over a hundred basic core cmdlets, and you can write your own cmdlets and share them with other users.
The Power of PowerShell certainly does NOT come from the environment itself or the built-in commandlets – not at all. It comes from the hugely useful modules written and published by vendors and community. The ones I mostly use are probably the modules for Azure, SharePoint, Exchange and PnP commandlets.
… because of course it is! Ah well, winget is a great idea with a decent implementation, suffering from an unstable platform it’s built on. I’ve now seen it break down seemingly randomly 3 times – once it was one of the many reasons I had to reinstall Windows completely.…Continue reading winget is broken again.
This article explains how to generate a CSR using the OpenSSL CLI toolkit. We’ll go through a step-by-step guide to create a private key and a CSR. This should be helpful for system administrators and developers who need to set up secure connections for their servers or applications. In the…Continue reading How to generate Certificate-Signing Requests using OpenSSL
This quick article explains how to clean up all dependencies installed with npm or yarn, and stored in folders called “node_modules” within your project and solution files. This regrettable step might be required to either free some disk space or clear weirdly broken dependencies from your project(s). Hope this will…Continue reading Removing node_modules under a folder
This article explains how to list all “Environment Variables” (that’s pipeline variables, job / stage variables, predefined variables and even local script variables that are mounted on to the agent as Environment Variables) using PowerShell in Azure DevOps.
In this article, I’ll share a simple script for a simple use case: removing blobs from a virtual directory structure in a container in an Azure blob storage account. This should be useful for a case like ours; removing certain directories and subdirectories but not the whole container. But let’s…Continue reading How to selectively remove items from an Azure blob storage container?