I’ve been building a number of scripts that query information using PowerShell.
To create those, I used some PowerShell tricks to make the output look just like I wanted. This post is a compilation of these tricks.
The first few tricks are simple, but they grow increasingly complex towards the end.
The examples here are geared towards SMB Shares and Volumes, but you can apply these concepts in many, many other situations.