format-data/session.ps1xml

<?xml version="1.0" encoding="utf-8" ?>
<Configuration>
    <Controls>
        <Control>
        <Name>Cumulocity-SessionFormat</Name>
        <CustomControl>
            <CustomEntries>
                <CustomEntry>
                    <CustomItem>
                        <Frame>
                            <LeftIndent>4</LeftIndent>
                            <CustomItem>
                                <Text>path: </Text>
                                <ExpressionBinding>
                                    <ScriptBlock>$_.path</ScriptBlock>
                                </ExpressionBinding>
                                <NewLine/>
                            </CustomItem>
                        </Frame>
                    </CustomItem>
                </CustomEntry>
            </CustomEntries>
        </CustomControl>
        </Control>
    </Controls>
    <ViewDefinitions>
        <View>
            <Name>Default</Name>
            <ViewSelectedBy>
                <TypeName>cumulocity/session</TypeName>
            </ViewSelectedBy>
            <GroupBy>
                <PropertyName>path</PropertyName>
                <CustomControlName>Cumulocity-SessionFormat</CustomControlName>
            </GroupBy>
            <ListControl>
                <ListEntries>
                    <ListEntry>
                        <ListItems>
                            <ListItem>
                                <PropertyName>description</PropertyName>
                            </ListItem>
                            <ListItem>
                                <PropertyName>host</PropertyName>
                            </ListItem>
                            <ListItem>
                                <PropertyName>tenant</PropertyName>
                            </ListItem>
                            <ListItem>
                                <PropertyName>username</PropertyName>
                            </ListItem>
                            <ListItem>
                                <Label>password</Label>
                                <ScriptBlock>$_.password -replace ".", "*"</ScriptBlock>
                            </ListItem>
                        </ListItems>
                    </ListEntry>
                </ListEntries>
                </ListControl>
        </View>
        <View>
            <Name>Default</Name>
            <ViewSelectedBy>
                <TypeName>cumulocity/sessionCollection</TypeName>
            </ViewSelectedBy>
            <TableControl>
                <TableHeaders>
                    <TableColumnHeader>
                        <Label>name</Label>
                        <Width>30</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>45</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>15</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>40</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>password</Label>
                        <Width>40</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>50</Width>
                    </TableColumnHeader>
                </TableHeaders>
                <TableRowEntries>
                    <TableRowEntry>
                        <!-- <Wrap /> -->
                        <TableColumnItems>
                            <TableColumnItem>
                                <ScriptBlock>(Get-Item $_.path).BaseName</ScriptBlock>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>host</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>tenant</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>username</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <ScriptBlock>$_.password -replace ".", "*"</ScriptBlock>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>description</PropertyName>
                            </TableColumnItem>
                        </TableColumnItems>
                    </TableRowEntry>
                </TableRowEntries>
            </TableControl>
        </View>
    </ViewDefinitions>
</Configuration>