Q. Can I create custom table views in PowerShell?

Yes, although it's complicated and not well-documented. You can find examples to copy and paste in PowerShell's installation folder. Within the shell, run.

Don Jones

September 6, 2010

1 Min Read
windows with white framing blue sky with clouds visible

Q. Can I create custom table views in PowerShell?

A. Yes, although it's complicated and not well-documented. You can find examples to copy and paste in PowerShell's installation folder. Within the shell, run

CD $pshome

and look for the ".format.ps1xml" files. Browse through one of those files in Notepad to find a TableControl to copy. Don't modify the Microsoft-provided files—doing so will invalidate them. After you've constructed your XML file, load it into the shell using the Update-FormatData cmdlet. Doing so only affects the current shell session, so you'll need to do that every time you open the shell. If it's something you want to use every time, put it in a profile script.

Do you have a Windows PowerShell question? Find more PowerShell FAQs, articles, and other resources at windowsitpro.com/go/DonJonesPowerShell.

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like