May 15th, 2014

PowerTip: View PowerShell Formatting Data

Doctor Scripto
Scripter

Summary: Learn how to view the formatting data for a Windows PowerShell type.

Hey, Scripting Guy! Question How can I use Windows PowerShell to view the formatting data for a particular type?

Hey, Scripting Guy! Answer Examine the output from Get-Member to find the type you are interested in, then use
          the Get-FormatData cmdlet. Store the returned object in a variable and explore it
          the way you do any other Windows PowerShell object.

$f=Get-FormatData -TypeName ModuleInfoGrouping

$f.FormatViewDefinition.control

$f.FormatViewDefinition.Control.headers

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.

Feedback