hi friends
as we know one of the most frustrating tasks in PowerShell is when we want to work with objects for example get commands, list files & directories, list processes, we have to Pipe our get-* commands to formatting commands like select-object, format-table -Autosize & ....
so I am studying the contents of get-help about_Format.ps1xml Cmdlet to create my own custom formatting file. but I've a faced a problem which I didn't find any guide after lots of googling.
according to instructions described in the get-help about_Format.ps1xml, say we want to add the calendar property to the default table view display of culture objects, so we create a copy of the following file & edit this copy & then use it.
"%windir%\System32\WindowsPowerShell\v1.0\DotNetTypes.format.ps1xml"
now inside the file, in this section: System.Globalization.CultureInfo
now in the following section, I don't know what is the one which I have bolded ( <TableColumnHeader/>)? what does it do?
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Width>16</Width>
</TableColumnHeader>
<TableColumnHeader>
<Width>16</Width>
</TableColumnHeader>
<TableColumnHeader/>
</TableHeaders>
as we see there is no opening here so that we say this closes that tag. so what's it?
also is it correct to say
the first <Width>16</Width> tag, shows the wide of the first column header (which is LCID)
the 2nd <Width>16</Width> tag, the wide of the first column header (which is Name )
?
but there is no 3rd <Width>16</Width> tag to say it is referring to the 3rd column header ( which is Displayname), instead we see this <TableColumnHeader/> there.
so what's this?
thanks in advanced