How to create custom PowerShell object formatting
Channel: PowerShell.org
Date: 2021-12-30

Presented by David Goldman
Are you tired of being overwhelmed with cmdlet output or victim to Select-Object throwing away your data when you forgot to save it to a variable? In this presentation I can teach you the lost art of object formatting! For more detailed information please see the course description.

---

When administrators use PowerShell to execute commands to retrieve information the data returned from cmdlet's object output pipeline can be overwhelming. Overtime as business requirements change so do the size of the workflows or scripts that are being executed to preform day-to-day operations. When this happens it is common for these scripts or workflows to become more complex, cumbersome and inefficient. In the end the time it takes administrators to filter through this data cost businesses lost revenue.
 
This might seem like a pretty bad and time consuming situation, however I am here to tell and show you there are ways to solve these issues. The answer is to customize your data output! Yes, I know that sounds complex, but it's not, once you understand some basic concepts about the PowerShell pipeline. I will do a deep dive on the pipeline, the logic behind it and how you can manipulate the pipeline in ways you probably haven't seen before. 

The goal is of this presentation is teach you how you grab the cmdlet information you care about and customize a data output that works for you. PowerShell has a few cool ways to display your information in (Table, List, Wide or Custom) formats.

These are the topics that I will cover in this presentation:

1. How PowerhShell uses objects, sends them down the pipeline, how data can be persevered or throw away in the pipeline which affects formatting.
2. Speak about the importance of the PSMembersSet and DefaultDisplayPropertySet and how the PowerShell formatting engine uses them to present the object back to the console.
3. Walk through the PowerShell core types and formatting files and how to use them and create formatting templates.
4. How to create custom PowerShell objects from scratch and how to configure them for formatting.
5. How you can do this on the fly from a live interactive PowerShell console session and also in PowerShell modules.

By the time you are done you will learn how fill in the holes on a concept that many people don't fully understand and start using the pipeline to your benefit!
All project files will be posted on GitHub for download for you to use as ready to go examples.