PowerShell and DevOps

TMH10 Every PowerShell Script in the World is This Simple: Get -> Filter -> Foreach

11/16/2023

2:30pm - 3:45pm

Level: Intermediate

Petri Paavola

Yodamiitti Oy

Did you know that pretty much every PowerShell script always contains same logic: Get/Search, Filter and Foreach. Even most complicated and advanced scripts use these same basics every time, there just might be many of those.

Sometimes it is good to look bigger picture what is happening and then come back to the code and actually write the code. This "simplifying" technique helps to understand and create simple and more advanced scripts.

Petri will showcase this approach with advanced configuration and troubleshooting tools he has created. Event that 5000 lines PowerShell script is the same: Get, Filter, Foreach...

You will learn:

  • That PowerShell scripts are usually quite simple in the end
  • To think big and then get back to code
  • Petri's tips for creating more advanced scripts