PowerShell SnippetRace 05-06/2025

empty, pester, active directory, error

Events

  • The PowerShell Engineering Team joins the
    PowerShell Usergroup Austria Quarterly Februar 11th 2025 17:00 CET.
    AIShell, PowerShell 7.5, and PlatyPS will be the topics:
    Register here – for an hour of news from the world of your your favorite one-liner.
  • ExpertsLive Austria Conference 2025 – June 18th 2025. Watch www.expertslive.at for more.

Snippets

Finding empty attributes/properties

Knowing the output of a CmdLet is the basis to work on the next step. CmdLets emit objects and objects habe properties. But how would you know if a property has no value ? Patrick Grünauer shows you a one-liner how to figure that out.

How to build a Pester framework for a module with 487 commands

If you now think „But shouldnt the pester framework be created BEFORE actual development starts ?“ yes, this should be the case but we are all humans. Adam bertram from devolutions had a problem ahd described nicely how he started with pester from an existing PS-Module. Read this 15 minutes article to bring your testing to a new level.

Mastering error handling

Another Adam Bertram this time, and it fits very well to testing. Error handling is important to understand, to write better code. Read Adams article on the different types of errors, and how to handle them.

How to get Active Directory trust details in PowerShell

With all that cloud and AI stuff out there, there are still a lot of people using Active Directory. For detailed info on trust relations and Sam Erdes little journey through his question read his article on hos blog.

Happy workweek / R.

Foto von Hans Reniers auf Unsplash

Leave a Reply