Formats/ServerManagement.Format.ps1xml

<?xml version="1.0" encoding="utf-8" ?>
<Configuration>
    <SelectionSets>
        <SelectionSet>
            <Name>NewTypes</Name>
            <Types>
                <TypeName>ServerManagement.ComputerInfo</TypeName>
            </Types>
        </SelectionSet>
    </SelectionSets>
    <ViewDefinitions>
        <View>
            <Name>IISLogPathTable</Name>
            <ViewSelectedBy>
                <TypeName>ServerManagement.IISLogPath</TypeName>
            </ViewSelectedBy>
            <TableControl>
                <TableHeaders>
                    <TableColumnHeader>
                        <Width>5</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>20</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>30</Width>
                    </TableColumnHeader>
                </TableHeaders>
                <TableRowEntries>
                    <TableRowEntry>
                        <TableColumnItems>
                            <TableColumnItem>
                                <PropertyName>Id</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>Name</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>LogPath</PropertyName>
                            </TableColumnItem>
                        </TableColumnItems>
                    </TableRowEntry>
                </TableRowEntries>
            </TableControl>
        </View>
        <View>
            <Name>CdpInfoTable</Name>
            <ViewSelectedBy>
                <TypeName>ServerManagement.CdpInfo</TypeName>
            </ViewSelectedBy>
            <TableControl>
                <TableHeaders>
                    <TableColumnHeader>
                        <Width>15</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>10</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>15</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>15</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>10</Width>
                    </TableColumnHeader>
                </TableHeaders>
                <TableRowEntries>
                    <TableRowEntry>
                        <TableColumnItems>
                            <TableColumnItem>
                                <PropertyName>ComputerName</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>Interface</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>SwitchName</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>PortName</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>NativeVlan</PropertyName>
                            </TableColumnItem>
                        </TableColumnItems>
                    </TableRowEntry>
                </TableRowEntries>
            </TableControl>
        </View>
        <View>
            <Name>ComputerDetail</Name>
            <ViewSelectedBy>
                <TypeName>ServerManagement.ComputerDetail</TypeName>
            </ViewSelectedBy>
            <TableControl>
                <TableHeaders>
                    <TableColumnHeader>
                        <Width>15</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>18</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>15</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>12</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>10</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>10</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>Memory</Label>
                        <Width>10</Width>
                    </TableColumnHeader>
                </TableHeaders>
                <TableRowEntries>
                    <TableRowEntry>
                        <TableColumnItems>
                            <TableColumnItem>
                                <PropertyName>ComputerName</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>Model</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>SerialNumber</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>CpuSockets</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>CpuCores</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>Dimms</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <ScriptBlock>
                                    $size = $_.Memory
                                    $postfixes = @( "B", "KB", "MB", "GB", "TB", "PB" )
                                    for ($i=0; $size -ge 1024 -and $i -lt $postfixes.Length - 1; $i++) { $size = $size / 1024; }
                                    "" + [System.Math]::Round($size,2) + " " + $postfixes[$i];
                                </ScriptBlock>
                            </TableColumnItem>
                        </TableColumnItems>
                    </TableRowEntry>
                </TableRowEntries>
            </TableControl>
        </View>
        <View>
            <Name>RasConnectionHistory</Name>
            <ViewSelectedBy>
                <TypeName>ServerManagement.RasConnectionHistory</TypeName>
            </ViewSelectedBy>
            <TableControl>
                <TableHeaders>
                    <TableColumnHeader>
                        <Width>15</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>20</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>25</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>25</Width>
                    </TableColumnHeader>
                    <TableColumnHeader></TableColumnHeader>
                    <TableColumnHeader>
                        <Width>10</Width>
                    </TableColumnHeader>
                </TableHeaders>
                <TableRowEntries>
                    <TableRowEntry>
                        <TableColumnItems>
                            <TableColumnItem>
                                <PropertyName>Server Name</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>Username</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>Session Start</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>Session End</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>Disconnect Reason</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <Alignment>Right</Alignment>
                                <PropertyName>Duration</PropertyName>
                            </TableColumnItem>
                        </TableColumnItems>
                    </TableRowEntry>
                </TableRowEntries>
            </TableControl>
        </View>
    </ViewDefinitions>
</Configuration>