Created
September 17, 2019 22:35
-
-
Save Jaykul/0231b0236bfc39117ad0b33468570fea to your computer and use it in GitHub Desktop.
Formatting InformationRecord does not work
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
<?xml version="1.0" encoding="utf-8" ?> | |
<Configuration> | |
<ViewDefinitions> | |
<View> | |
<Name>InformationRecord</Name> | |
<OutOfBand /> | |
<ViewSelectedBy> | |
<TypeName>System.Management.Automation.InformationRecord</TypeName> | |
</ViewSelectedBy> | |
<CustomControl> | |
<CustomEntries> | |
<CustomEntry> | |
<CustomItem> | |
<ExpressionBinding> | |
<ScriptBlock> | |
$_.MessageData | Format-List * | Out-String | |
</ScriptBlock> | |
</ExpressionBinding> | |
<ExpressionBinding> | |
<ScriptBlock> | |
"Tags: " + @($_.Tags -join ", ") | |
</ScriptBlock> | |
</ExpressionBinding> | |
<ExpressionBinding> | |
<ScriptBlock> | |
$_ | Select-Object * -ExcludeProperty Tags, MessageData | Format-List * -Force | Out-String | |
</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