PowerShell SnippetRace 51-52/2024

Beginner, VS-Code, AIShell, Join-Path, flow control

Events

  • Steven Bucher and Jason Helmick from the PowerShell Engineering Team join us for the PowerShell Usergroup Austria Quarterly Februar 11th 2025.
    Stay tuned for details – this will be 60 minutes of feature packed news from the world of your favorite one-liner.
  • ExpertsLive Austria Conference 2025 – June 18th 2025. Watch www.expertslive.at for more.

Snippets

Setting up VS-Code for PowerShell Development – Beginners Guide

There are still so many people out their clicking in GUIs on the one hand but knowing, this isnt the future on the other. A step into coding may be using PowerShell for administrative tasks. Adam Bertram wrote a nice summary on how to start with VS-Code and setup a proper coding environment for PowerShell. It includes installation, addins, vs-code features, running code on a termina and so on. Its also useful for experiences PowerShell devs to understand the one or other thing which just „works“ but you dont know why.

The less common tricks of Join-Path

Join-Path is around in PowerShell for ages, with multiplatform beeing available since PowerShell Core, Join-Path has gotten more important than ever wi handle system paths accoringly over different OS´ses. Read Sam Erdes Blog on the less known features of this powerful CmdLet. Handle wildcards, multiple parents, or the parameter -additionalpath, only available in PowerShell Core. Very useful !

AIShell Tutorial

Markus Elsberger wrote a short tutorial on AIShell and also gave some examples. I did 2 blogposts in AIShell myself, AIShell-preview on macOs and using AIShell with self-hosted OLLama. The topic seems to get more interest, we will keep yoou informed.

Stay in the Flow-Control !

Automation requires that code follows specif rules. Many programming languages, and also PowerShell use mechanisms as if/else and switch handle this requirement. Read the blog on 4Sysops for some simple examples.

And now enjoy the holiday season, read you on 2025.

R.

Foto von Matt Hardy auf Unsplash

Leave a Reply