Powershell 🏷️


or

C++: On #include guards (2022-02-14)
In C and C++ there exists the concept of include guards (header guards) to prevent that a header file (or rather the content of such file) is included more than once, because that could cause errors and strange behavior due to redeclarations or name collisions1.
Journal #11 (2022-01-06)
Well, looks like I somehow caught a severe case of “summer blues” last year, that’s why I didn’t code much in my spare time in the last couple of months. But now I’m slowly getting back in the saddle.
Journal #9 (2021-03-05)
The second half of 2020 was regrettably pretty unproductive for me in terms of (C++) code – that wasn’t really planned, but life is strange sometimes (… he says, sitting at home, during the COVID-19 lockdown).
Notepad++: Run command (2020-12-20)
How to add custom commands to the Run menu.
Powershell Snippets (2021-01-22)
A collection of code snippets, small pearls of wisdom and bits of knowledge that may come handy at times.
Powershell: Cmdlet Aliases, Automatic Variables and other Shortcuts (2021-01-21)
Some notes on the items listed in the title 😉
Powershell: Dynamic Parameters (2024-10-17)
This is an extension to my notes on parameters for scripts or (advanced) functions in Powershell: Dynamic (or conditional) parameters are an interesting and cool feature, but also a bit tricky and cumbersome to set up. Often times, much simpler things like parameter sets and/or parameter validations may be the better and easier solution – but on the other hand: Sometimes, those are not the right tools and one really should use dynamic parameters…
Powershell: Handle input from the pipeline (2021-01-18)
A short description on how to make a Powershell function that can accept and process input data that it gets from the pipeline.
Powershell: Help (2021-01-21)
Some notes on where and how to get help-information for Powershell commands.
Powershell: Name of the current Citrix desktop (2023-07-02)
For my day job, I wanted know the name of the ‘Citrix’ desktop on which I was currently logged in, because some features are only available on certain desktops in our environment.
Powershell: Parameters for Scripts and (Advanced) Functions (2021-01-19)
Some notes on parameters for scripts or (advanced) functions in Powershell.
Powershell: Profile (2021-01-18)
A Powershell profile is a script file that is run each time a new Powershell is opened. You can define session-specific items in it (variables, aliases, functions, etc.) or call other scripts and commands at the start of a new Powershell session.
Powershell: PSCustomObject (2022-01-29)
Powershell’s PSCustomObject type has been a great tool, but since I don’t use it every day, I jotted down some sample code and links for my future self (or any other interested reader 😄 ), as a reminder.
Powershell: Remote Session (2021-01-22)
Notes on using a remote session with Powershell
Powershell: Select Choice (2023-07-10)
The need to prompt a user for a choice in a text menu (i.e. in the console), and a slight dissatisfaction with the commonly recommended $Host.ui.PromptForChoice() after experimenting a bit with it, triggered me to ultimately write my own function.
Powershell: Splatting (2021-01-21)
Some notes on the method of “splatting” in Powershell code.
Powershell: Starting a Script the Easy Way (2020-04-25)
Powershell scripts can be very practical tools, but they lack an easy Just Do It mode:
Even as a developer/administrator/power-user, one has to remove several obstacles before you can use it; and if you plan to deploy a script to (normal) users, you should take care of some issues before.
Powershell: Transcript (Log) (2021-01-18)
A transcript logs all action of a Powershell session to a text file; good for documenting and archiving.
Powershell: Using Regular Expressions (2021-03-05)
This is not a introduction or tutorial on what Regular Expressions (RegEx) are or can do, but on how to use them with Powershell!
Powershell: Using Write-Information (2023-07-16)
This started out as a short entry for my Powershell Snippets page, but it quickly turned out that this cmdlet needs a longer text for explaining proper handling…
Powershell: Working with JSON (2024-05-09)
A few tips and tricks for handling JSON data with Powershell.
Powershell: Working with the Windows Registry (2024-02-28)
Here are some tips and trick on how to work on the Windows Registry with Powershell.
QuickADUserInfo 1.0 (2020-05-05)
The first version of my new little helper script QuickADUserInfo has been released.