But if you wanted to use Format-Table and have that output in a file? While it may not be obvious, it does work.
Ok, so it's not what we expected right? And that's why people are saying to use Format-Table, Format-List as last in the pipeline because it's supposed to be for display purposes only. How about this?
So, it seems Out-File is able to deliver what you see on the screen into a file! But that's not all. What if we wanted to use Set-Content and Add-Content the same way we use Out-File? Take a look at this
See, we merely introduced Out-String which gives me the same output as you would get with Out-File. So, can we use Format-Table/Format-List in the middle of the pipeline? Yes, we can! But the output will not be an object that we can quickly process later on. Still, if we just wanted to see the same thing we have on screen in the form of a file, why not use it that way? There are a couple of other ways to use Out-String and Format-Table, but that's something for another blog post.