Open
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest version
- Search the existing issues.
Steps to reproduce
I'm getting an error when passing certain objects into the Out-ConsoleGridView
, while others work perfectly fine. I first noticed this with the AWS PowerShell modules.
I'm assuming this issue is related to one of the child properties of the EC2 instance objects. I can limit the returned properties by using Select-Object
, and the command works alright.
NOTE: You'll need an AWS account and AWS IAM credentials in order to reproduce this.
Expected behavior
# This command should display a list of EC2 instance types
Get-EC2InstanceType | Out-ConsoleGridView
# This command works fine:
Get-S3Bucket | Out-ConsoleGridView
# This command also works fine:
Get-EC2InstanceType | Select-Object -Property InstanceType | Out-ConsoleGridView
Actual behavior
Command fails to run with an error.
Error details
Out-ConsoleGridView: Object reference not set to an instance of an object.
Environment data
Name Value
---- -----
PSVersion 7.4.6
PSEdition Core
GitCommitId 7.4.6
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Binary 4.1.691 AWS.Tools.Common {Add-AWSLoggingListener, Clear-AWSCredential, Cle…
Binary 4.1.691 AWS.Tools.EC2 {Add-EC2CapacityReservation, Add-EC2ClassicLinkVp…
Binary 4.1.691 AWS.Tools.S3 {Add-S3PublicAccessBlock, Copy-S3Object, Get-S3AC…
Script 0.0 ImportGuard
Binary 0.7.7 Microsoft.PowerShell.ConsoleGuiToo… {Out-ConsoleGridView, Show-ObjectTree, ocgv, shot}
Manifest 7.0.0.0 Microsoft.PowerShell.Management {Add-Content, Clear-Content, Clear-Item, Clear-It…
Manifest 7.0.0.0 Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Ob…
Script 2.3.5 PSReadLine {Get-PSReadLineKeyHandler, Get-PSReadLineOption, …
Version
0.7.7