I find that I frequently want to see the members of objects I am working with, and prefer to do this in a GridView. If, however, there are objects of different types in the collection there can be issues. When simply sending the collection to Get-Member there are separate results for each object type, but when then piping this to Out-GridView the member collections get merged in to one GridView.
To get around this I wrote my own cmdlet Out-MemberToGridView which launches a new GridView for each object type in the collection.
[String]$objectTypes = @()
$objectTypeName = $PSItem.GetType().FullName
if (-not ($objectTypes.Contains($objectTypeName)))
$objectTypes += $objectTypeName
$GridTitle = $objectTypeName
$GridTitle = $Title
$PSItem | Get-Member | Out-GridView -Title $GridTitle -Wait:$Wait
How to use a PIVOT operator with dynamic values
Students have asked several times (every time) how to create a dynamic PIVOT query, to... Next Post
DDLS launches EC-Council Security Training Courses
Sydney, 6 May 2014 – DDLS (Dimension Data Learning Solutions), Australia’s largest provider of technical IT training, certification and professional...