O'Reilly logo

Learn PowerShell Toolmaking in a Month of Lunches by Don Jones and Jeffrey Hicks

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

12.7. Labs

We bet you can guess what’s coming. You’ll be adding type information and creating custom format files for the functions you’ve been working on the last several chapters. Use the dotnettypes.format.ps1xml and other .ps1xml files as sources for sample layout. Copy and paste the XML into your new format file. Don’t forget that tags are case sensitive.

12.7.1. Lab A

Modify your advanced function from Lab A in chapter 10 so that the output object has the type name MOL.ComputerSystemInfo. Then, create a custom view in a file named C:\CustomViewA.format.ps1xml. The custom view should display objects of the type MOL.ComputerSystemInfo in a list format, displaying the information in a list as indicated in your design for this lab. Go back ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required