Skip navigation
windows with white framing blue sky with clouds visible

Q. Can I create custom table views in PowerShell?

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.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish