Created
May 16, 2016 19:51
-
-
Save lzybkr/eddc79020dfddc821782cfce8b671f05 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Configuration> | |
<ViewDefinitions> | |
<View> | |
<Name>Measure-Object-Output</Name> | |
<ViewSelectedBy> | |
<TypeName>Microsoft.PowerShell.Commands.GenericMeasureInfo</TypeName> | |
</ViewSelectedBy> | |
<ListControl> | |
<ListEntries> | |
<ListEntry> | |
<ListItems> | |
<ListItem> | |
<PropertyName>Count</PropertyName> | |
</ListItem> | |
<ListItem> | |
<ItemSelectionCondition><ScriptBlock>$null -ne $_.Average</ScriptBlock></ItemSelectionCondition> | |
<PropertyName>Average</PropertyName> | |
</ListItem> | |
<ListItem> | |
<ItemSelectionCondition><ScriptBlock>$null -ne $_.Sum</ScriptBlock></ItemSelectionCondition> | |
<PropertyName>Sum</PropertyName> | |
</ListItem> | |
<ListItem> | |
<ItemSelectionCondition><ScriptBlock>$null -ne $_.Maximum</ScriptBlock></ItemSelectionCondition> | |
<PropertyName>Maximum</PropertyName> | |
</ListItem> | |
<ListItem> | |
<ItemSelectionCondition><ScriptBlock>$null -ne $_.Minimum</ScriptBlock></ItemSelectionCondition> | |
<PropertyName>Minimum</PropertyName> | |
</ListItem> | |
<ListItem> | |
<ItemSelectionCondition><ScriptBlock>$null -ne $_.Property</ScriptBlock></ItemSelectionCondition> | |
<PropertyName>Property</PropertyName> | |
</ListItem> | |
</ListItems> | |
</ListEntry> | |
</ListEntries> | |
</ListControl> | |
</View> | |
<View> | |
<Name>Timespan</Name> | |
<ViewSelectedBy> | |
<TypeName>System.TimeSpan</TypeName> | |
</ViewSelectedBy> | |
<CustomControl> | |
<CustomEntries> | |
<CustomEntry> | |
<CustomItem> | |
<ExpressionBinding> | |
<ScriptBlock> | |
$d = $_.Days; $h = $_.Hours; $m = $_.Minutes; $as = "","s" | |
$(if ($d) { "{0} day{1}," -f $d, $as[$d -gt 1] } | |
if ($h) { "{0} hour{1}," -f $h, $as[$h -gt 1] } | |
if ($m) { "{0} minute{1}," -f $m, $as[$m -gt 1] } | |
"{0}.{1}s" -f $_.Seconds, $_.Milliseconds.ToString('D3')) -join " " | |
</ScriptBlock> | |
</ExpressionBinding> | |
</CustomItem> | |
</CustomEntry> | |
</CustomEntries> | |
</CustomControl> | |
</View> | |
</ViewDefinitions> | |
</Configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Shouldn't this be included the box? At least the measure part.