Decorating PowerShell Objects
Ever wonder how PowerShell seems to know how to format objects? When you run
Get-ChildItem or
Get-WmiObject , you only see a few key properties, but a wealth of other information is available through commands like
Select-Object and
Get-Member .
Have you ever written a PowerShell function that you nearly always pipe to
Format-Table ? Wouldn’t it be nice to specify some default properties and force them into a table?
Stop by for a quick hit on how to decorate your PowerShell objects with type names and formatting, including a re-usable tool to abstract out some of the details.
Cheers!
Related Articles
PowerShell Escape Room
PowerShell Escape Room by Michiel Hamers by Michiel Hamers https://about.me/michielhamers/ Why on earth you want to create an …
Read moreMicrosoft Graph PowerShell Module: Getting Started Guide
Microsoft Graph PowerShell Module: Getting Started Guide by Jeff Brown Microsoft is retiring the Azure AD Graph API sometime …
Read moreICYMI: PowerShell Week of 08-October-2021
Topics include VMWare, Windows 11, Web Reports and more… Special thanks to Robin Dadswell, Prasoon Karunan V, Kiran …
Read more