That brings us to the end of this module on formatting with PowerShell.
But before I let you dive back into the PowerShell console to keep
experimenting and exploring, and believe me, I really want you to do that,
there are a few key takeaways I want to leave you with.
Firstly, formatting can be used explicitly, but it's often used implicitly.
It's good to remember that PowerShell does a pretty good job
of formatting by default out of the box.
The rules that PowerShell follows have been thought out well to aim to
give you the most relevant information in a way that's easily
digestible by a human reading it on the screen.
Most of the time it may get you what you need.
Secondly, the formatting system, look, it can be complex,
but honestly, don't let that worry you.
I know we picked under the covers a bit there to take a look at
the raw formatting data and the XML output.
And when you get more experience with PowerShell,
you may go on to write your own custom format views and definitions.
But for now,
it's not really something you have to care too much about.
Just being aware that it's there is more than enough to get
you through your day‑to‑day usage.
If the default formatting isn't quite getting you what you're after,
you are now armed with everything you need to get up and
running with formatting data to tables,
lists, and to that wide format we looked at as well.
You can't break anything by playing around with the formatting of data,
so please, if you haven't done so already,
get your PowerShell console out and start exploring and
experimenting with these different format commands.
This is very much like anything in PowerShell,
in fact, pretty much like anything in life.
The more you use it,
the better you'll become at using it and the more
familiar you'll become with it.
Before you know it,
you'll be automatically piping data to fl for lists and ft for tables
to get the exact output you want when you want it.
I want to leave you with a couple of key points
about the PowerShell format system.
Always remember that the format cmdlets format data. They are not
responsible for getting that data out of the pipeline.
That is the job of the out cmdlets. And without you knowing it,
Out‑Default and Out‑Host are being appended to your commands.
Finally,
leave your formatting until last, or as we spoke about in the
previous clip, leave formatting to the right.
That is to say,
formatting should be the very last thing you do with data in your
pipeline unless you're piping it to an out cmdlet.
Speaking of those out cmdlets, that's a perfect segue into what's coming up next,
which is a module on working with the out cmdlets in PowerShell. I hope you've enjoyed this module, and I can't wait to see you in the next one.