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.

function Out-MemberToGridView{[CmdletBinding()]Param([parameter(ValueFromPipeline=$true)][Object]$inputObject,[string]$Title,[Switch]$Wait)

Begin{[String]$objectTypes = @()}Process{$objectTypeName = $PSItem.GetType().FullNameif (-not ($objectTypes.Contains($objectTypeName))){$objectTypes += $objectTypeNameif ([String]::IsNullOrEmpty($Title)){$GridTitle = $objectTypeName}else{$GridTitle = $Title}$PSItem | Get-Member | Out-GridView -Title $GridTitle -Wait:$Wait}}End{}}



Feature Articles


Blog
The Philippines' National Cyber Security Plan 2023-2028: Roadmap to Cyberspace Resilience
By Justin Luna | 28 August 2024
Blog
2024-2025 Government Budget: Focusing investment in cyber security skilling
By Jeremy Daly | 1 July 2024
Read
Blog
20 Tips for Secure Cloud Migration, Supported with ISC2 CCSP Training
By Jeremy Daly | 14 March 2025
eBook
The Ultimate Guide to the CCSP
By Lumify Work Team and ISC2 | 14 March 2025
Blog
Transforming the Philippine Workforce: The National AI Strategy and AI Skills Development
By Chloe Villanueva | 18 December 2024
Case Study
Boosting Government Cyber Security: The Impact of ISC2 CLSSP Certification in COMELEC
By Chloe Villanueva | 19 December 2024
News
Lumify Work Product Manager Achieves Triple Ambassador Status with PeopleCert
By Lumify Work Team | 17 March 2025