Show-ConsoleObject opens an object in the terminal. Move through its members, expand a branch or drill into it, and return a selected value without flattening the object into a table first.
Install and import the module in PowerShell 5.1 or 7:
Install-Module ConsoleMonster -Scope CurrentUser Import-Module ConsoleMonsterRun the complete PowerShell example beside the frame below. It defines the server and opens the explorer.
$server = [pscustomobject]@{
Name = 'web-01'
Owner = [pscustomobject]@{
PSTypeName = 'OwnerInfo'
Name = 'Ada'
Groups = @('Operators', 'Readers')
}
Services = @(
[pscustomobject]@{ Name = 'web'; Status = 'Running'; Port = 443 }
[pscustomobject]@{ Name = 'metrics'; Status = 'Running'; Port = 9090 }
)
Enabled = $true
}
$server | Show-ConsoleObject -Title 'Server configuration' -RootPath '$server'
Server configuration 4 members $server ╭─ Members ────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ > Name web-01 │ │ + Owner OwnerInfo │ │ + Services 2 items │ │ Enabled yes │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ↑↓ move right expand enter drill / search f10 choose esc quit f1 keys
Server configuration 4 members $server ╭─ Members ────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ > Name web-01 │ │ + Owner OwnerInfo │ │ + Services 2 items │ │ Enabled yes │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ↑↓ move right expand enter drill / search f10 choose esc quit f1 keys
Import-Module ConsoleMonster
$server = [pscustomobject]@{
Name = 'web-01'
Owner = [pscustomobject]@{
PSTypeName = 'OwnerInfo'
Name = 'Ada'
Groups = @('Operators', 'Readers')
}
Services = @(
[pscustomobject]@{ Name = 'web'; Status = 'Running'; Port = 443 }
[pscustomobject]@{ Name = 'metrics'; Status = 'Running'; Port = 9090 }
)
Enabled = $true
}
$server | Show-ConsoleObject -Title 'Server configuration' -RootPath '$server'
var server = new {
Name = "web-01",
Owner = new OwnerInfo("Ada", new[] { "Operators", "Readers" }),
Services = new[] {
new { Name = "web", Status = "Running", Port = 443 },
new { Name = "metrics", Status = "Running", Port = 9090 }
},
Enabled = true
};
new ObjectExplorer(server, rootPath: "$server")
.WithTitle("Server configuration")
.Show();
sealed record OwnerInfo(string Name, string[] Groups);Full program
using ConsoleMonster.Interactive;
var server = new {
Name = "web-01",
Owner = new OwnerInfo("Ada", new[] { "Operators", "Readers" }),
Services = new[] {
new { Name = "web", Status = "Running", Port = 443 },
new { Name = "metrics", Status = "Running", Port = 9090 }
},
Enabled = true
};
new ObjectExplorer(server, rootPath: "$server")
.WithTitle("Server configuration")
.Show();
sealed record OwnerInfo(string Name, string[] Groups);Up and Down move the focus. Right expands a member; Left collapses it. Enter drills into the member and puts its path in the breadcrumb. Backspace returns to the previous object. Press /, type a search, then Enter to navigate the matching names and values. Search covers the current level and expanded branches, preserving lazy reads of unopened descendants. F1 lists the available keys.
Use F10 or Ctrl+Enter to accept, or Esc to cancel. Browsing alone returns nothing. Add -PassThru to return the original selected value, or -PassThru Path to return a quoted PowerShell expression:
$value = $server | Show-ConsoleObject -PassThru
$path = $server | Show-ConsoleObject -RootPath '$server' -PassThru Path
# Selecting the second group returns: $server.Owner.Groups[1]
-RootPath supplies the expression's root and defaults to $x. The explorer displays it without evaluating it. Dictionary keys and property names with punctuation are quoted. Collection selection returns the selected member as one value, preserving collections instead of enumerating them into separate pipeline records.
Server configuration 4 members $server ╭─ Members ────────────────────────────────────────────────╮ │ > Name web-01 │ │ + Owner OwnerInfo │ │ + Services 2 items │ │ Enabled yes │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰──────────────────────────────────────────────────────────╯ ↑↓ move right expand enter drill / search f1 keys
Server configuration 4 members $server ╭─ Members ────────────────────────────────────────────────╮ │ > Name web-01 │ │ + Owner OwnerInfo │ │ + Services 2 items │ │ Enabled yes │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰──────────────────────────────────────────────────────────╯ ↑↓ move right expand enter drill / search f1 keys
Import-Module ConsoleMonster
$server = [pscustomobject]@{
Name = 'web-01'
Owner = [pscustomobject]@{
PSTypeName = 'OwnerInfo'
Name = 'Ada'
Groups = @('Operators', 'Readers')
}
Services = @(
[pscustomobject]@{ Name = 'web'; Status = 'Running'; Port = 443 }
[pscustomobject]@{ Name = 'metrics'; Status = 'Running'; Port = 9090 }
)
Enabled = $true
}
$server | Show-ConsoleObject -Title 'Server configuration' -RootPath '$server'
var server = new {
Name = "web-01",
Owner = new OwnerInfo("Ada", new[] { "Operators", "Readers" }),
Services = new[] {
new { Name = "web", Status = "Running", Port = 443 },
new { Name = "metrics", Status = "Running", Port = 9090 }
},
Enabled = true
};
new ObjectExplorer(server, rootPath: "$server")
.WithTitle("Server configuration")
.Show();
sealed record OwnerInfo(string Name, string[] Groups);Full program
using ConsoleMonster.Interactive;
var server = new {
Name = "web-01",
Owner = new OwnerInfo("Ada", new[] { "Operators", "Readers" }),
Services = new[] {
new { Name = "web", Status = "Running", Port = 443 },
new { Name = "metrics", Status = "Running", Port = 9090 }
},
Enabled = true
};
new ObjectExplorer(server, rootPath: "$server")
.WithTitle("Server configuration")
.Show();
sealed record OwnerInfo(string Name, string[] Groups);PowerShell objects, dictionaries, collections and ConvertFrom-Json output share the existing inspector adapters. Uniform collections have a small inline table when drilled into. Each getter is read once on demand. Cycles remain leaves. -Depth, -MaxItems and -MaxNodes bound expansion; -Exclude skips getters that are expensive or have side effects. An already executing synchronous getter cannot be interrupted by an inspection budget.
Redirected output, CI, -NonInteractive, line mode and accessible mode print the existing static inspector. They return no selected value and do not wait for input. This also makes the command useful in SSH sessions without a terminal. The screen keeps text markers and keyboard navigation in 16-colour and no-colour terminals.
For C#, create a console project with dotnet new console, add the package with dotnet add package ConsoleMonster, and replace Program.cs with the complete C# program beside the frame. Both examples define the same server. ObjectExplorer.Show() returns the selected node, or null after cancellation or static fallback. Its Path and Value properties expose the selection.
Try the interactive grid to pick rows from a collection, or the PowerShell conventions for composition and output capture.