Looking back at the scripts I created the last year, certain things always come back in most of them. In this blog post, I will show you a few and explain them.
Formatting
PowerShell Out-ConsoleGridView and F7History
I saw these two console tools for PowerShell in my newsfeed, and I like them 🙂 This blog post will show you what they are and how they work.
Using the #Requires statement in PowerShell
Sometimes you have scripts that require specific versions of modules, or if the script is started with Administrator privileges, you can add checks for that in the script itself or... You can use the built-in #Requires statement for that. In this blog post, I will show you how.
Visual Studio Code Snippets and PowerShell
You often repeat certain standard things when writing scripts in Visual Studio Code. Wouldn't it be nice if we could simplify that? This blog post will show you how to use VSCode Snippets to your advantage!
Server-Side-Filtering in PowerShell
Retrieving objects in your scripts is something that you do regularly. It takes a long time to download and process in larger environments, wasting CPU and time. This blog post will explain how to speed up scripts by filtering server-side before downloading all results and filtering afterward.
PowerShell and variables
Every script I write has variables in it, but there are different types of variables. This short blog post will show a few types you can use in your scripts.
PowerShell output on screen
It's always nice to have some screen output while running scripts interactively, in this blog post I will show you a few ways to do that.
Using PSScriptAnalyzer to optimize your PowerShell scripts
I use Visual Studio Code for writing PowerShell scripts, which makes formatting and writing so much easier. Even though it shows you things that you shouldn't do, for example using aliases, you can get even more tips and hints to make your code even better. This blog post will show you how to use the PSScriptAnalyzer module which can give you some additional hints that Visual Studio Code doesn't show you.
PowerShell tips and tricks
Over the years, I learned many PowerShell tricks but stopped using a few because they were outdated or not that smart to use anymore performance-wise. In this blog post, I will share a few of them 🙂 (These are just a few, I will write a new blog post with others in the future)
How to make your PowerShell scripts look better
When I started writing my first PowerShell scripts... They didn't look that good, it was PowerShell 2.0, of course, and I was just a beginner 🙂 I'm getting better at it, and the newer versions of PowerShell (And Visual Studio Code) have a few nice formatting tricks. This blog post will show you a few ways to make your scripts look better and, more importantly... A lot more readable!