< Back

New-Table

Tue Jan 14, 2020 2:35 am

NAME New-Table



SYNOPSIS

Creates a new TableData object for rendering in New-Report





SYNTAX

New-Table [-Title] <String> [[-Description] <String>] [-InputObject] <PSObject> [[-Emphasis] {default | primary |

success | info | warning | danger}] [<CommonParameters>]





DESCRIPTION





PARAMETERS

-Title <String>

A title that goes on the top of the table



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Description <String>

Description to go above the table



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-InputObject <PSObject>

Data for the table (can be piped in)



Required? true

Position? 3

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Emphasis

Emphasis value: default (unadorned), primary (highlighted), success (green), info (blue), warning (yellow),

danger (red)



Required? false

Position? 4

Default value primary

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-ChildItem C:\\Users -Directory |



Select LastWriteTime, @{Name="Length"; Expression={

(Get-ChildItem $_.FullName -Recurse -File -Force | Measure Length -Sum).Sum

} }, Name |

New-Table -Title $Pwd -Description "Full file listing from $($Pwd.Name)"



Collect the list of user directories and measure the size of each











RELATED LINKS