A PowerShell module that allows you to dump all of an object's properties, including nested objects, to the console in a nice, colourful, structured, and easy-to-read format. This enhances productivity in exploratory and debugging workflows in the terminal.
Currently dumPS only supports PowerShell v7.3+, but support for PowerShell v5 is planned for the near future.
If you enjoy this module, consider giving it a GitHub star β to show your support.
When debugging PowerShell in Visual Studio Code you can use the Variables and Watch windows to drill into objects and see all of their property values.
When experimenting in the terminal however, it is very difficult to see all nested properties of an object.
You can pipe objects to Select-Object *
to see all top-level property values, but this does not show nested objects' properties.
dumPS allows you to easily view all of an object's nested properties in the console in a nice, structured format.
List the features of this project:
- Easily view all properties and values of an object in the terminal, including nested objects.
PassThru
parameter to still return the object being displayed.
The following code produces the output screenshot below:
$dan = @{
Name = 'Daniel Schroeder'
Alias = 'deadlydog'
Address = @{
Province = 'Saskatchewan'
Country = 'Canada'
}
Likes = @('Programming', 'PowerShell', '.NET', 'Dogs')
}
$dan | Out-Dump
Install the module from the PowerShell Gallery:
Install-Module -Name dumPS -Scope CurrentUser
Display all properties of an object using full cmdlet name:
$process = Get-Process | Select-Object -First 1
Out-Dump -InputObject $process
Pipe an object to display all properties:
$process = Get-Process | Select-Object -First 1
$process | Out-Dump
Display the object as part of a pipeline:
Get-Process | Select-Object -First 1 | Out-Dump
Use the PassThru
parameter to display the object while still returning it to the pipeline:
$process = Get-Process | Select-Object -First 1 | Out-Dump -PassThru
Use the dumps
alias in place of Out-Dump
:
Get-Process | Select-Object -First 1 | dumps
Aside: The alias is
dumps
instead ofdump
to avoid conflicting with the unixdump
command.
Issues and Pull Requests are welcome. See the Contributing page for more details.
See what's changed in the application over time by viewing the changelog.
Buy me a toque for providing this PowerShell module open source and for free π
This module utilizes Dumpify. The Dumpify library is doing all of the heavy lifting and I thank them for making this PowerShell module possible.