[We’ve closed the commenting period for this excerpt and removed the file – if you’re interested in reviewing chapters, please see http://www.sapien.com/blog/current/2007/4/25/new-powershell-book-early-reviewer-program.html]
Click on “Files” in the right-hand column to download “Excerpt.pdf.” I’m looking for feedback, which you can just leave in comments here. This file is an excerpt from a new PowerShell book I’m working on; this chapter covers PowerShell’s formatting capabilities and walks you through creating various types of custom format views.
Here’s what I’d like to hear from you in your comments:
- Is this readable? Understandable?
- Does this cover what you need to know about the topic? Too much? Not enough?
- Is this well-organized, or would you present things in a different order (and what would that order be)?
This is obviously a very rough first draft, and I appreciate your taking the time to review it and provide some feedback. It does assume that you know about PowerShell’s Format-* cmdlets, so if you haven’t used those before, give them a whirl first (this chapter would be considered “advanced” material – so if you’re a beginner and it’s over your head, that’s okay for right now – you haven’t seen the rest of the book, yet!)
Thanks!! BTW… if you know anyone who is interested in, or works with PowerShell, send ‘em over to take a look, too!
(BTW, if we get a good response from this “online draft” review, we’ll do it with other chapters in the future… so keep that in mind! It’s all about the quantity and quality of the comments we receive!)
WOW!
A quick read shows this to be one of the most complete discussions of the foratter I have seen.
I will take some time to digest it and comment when I can really give it my full attention.
Try this
get-process | fc
What is it’s defualt output and why?
Is this useful?
JV: About Format-Custom’s default output, you’re not reading that because it’s covered elsewhere in the book – where we cover the other Format cmdlets’ default output. Good to think of it, though – thanks!
I found a few errors in your table format for get-process on page 9. A couple of nodes were spelled incorrectly (/PropetyName) and a node was missing (TableColumnItems). Here’s what I have working after the corrections:
<View>
<Name>MyView</Name>
<ViewSelectedBy>
<TypeName>System.Diagnostics.Process</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Label>Name</Label>
<Width>20</Width>
<Alignment>Left</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Label>Process ID</Label>
<Width>10</Width>
<Alignment>Center</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Label>CPU(s)</Label>
<Width>10</Width>
<Alignment>Right</Alignment>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>Name</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>ID</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>CPU</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
Also, the CPU property is has a label indicating it is a %age, when it is actually the $_.TotalProcessorTime.TotalSeconds property.
Just finished up. The information is presented clearly and is very informative, but I would have opted for a slightly different order if this chapter is to be consumed ‘stand alone’. I would also include just a bit more information.
I would include the location of the dotnettypes.format.ps1xml file at the beginning of the chapter. The file is referenced but its location is not disclosed and could take a reader a while to find it. I would also include a suggestion of where to keep your own custom formatting files and the pros/cons of each of these locations. You could also include a discussion of how loading these files in the different profiles can change what is finally available in the shell (sort of an expansion of the append / prepend discussion already present).
I would move the information regarding how to update this data to the beginning of the chapter.
thanks for providing it. it explained quite a bit.
mark
Thanks for the feedback – we obviously haven’t done a tech edit pass on any of the new material yet, but it’s good to hear what additional information you’d like included.