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.
Category: Formatting
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!
Use Visual Studio Code instead of PowerShell ISE
I started writing PowerShell scripts using the built-in Windows PowerShell Integrated Scripting Environment (ISE) a long time ago. It's always there for you in Windows and was perfect for what I was doing then. But sometimes, you need more functionality, and that's where Visual Studio Code (VS Code) comes in. In this blog post, I would like to show you some features which make VS Code my editor of choice.