{"id":13597572,"url":"https://github.com/santisq/PSTree","last_synced_at":"2025-04-10T01:30:55.127Z","repository":{"id":39868210,"uuid":"437389068","full_name":"santisq/PSTree","owner":"santisq","description":"Tree-like cmdlets for file system and registry exploration!","archived":false,"fork":false,"pushed_at":"2025-04-07T19:49:54.000Z","size":950,"stargazers_count":80,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-09T18:18:39.240Z","etag":null,"topics":["csharp","filesystem","hierarchy","powershell","recursion","registry","tree","tree-structure"],"latest_commit_sha":null,"homepage":"https://www.powershellgallery.com/packages/PSTree","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/santisq.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-11T21:07:26.000Z","updated_at":"2025-04-07T19:46:51.000Z","dependencies_parsed_at":"2024-01-14T04:43:58.920Z","dependency_job_id":"8f4971da-a96f-4a02-9bcd-09e37b9bf94f","html_url":"https://github.com/santisq/PSTree","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santisq%2FPSTree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santisq%2FPSTree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santisq%2FPSTree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santisq%2FPSTree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/santisq","download_url":"https://codeload.github.com/santisq/PSTree/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248140266,"owners_count":21054269,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","filesystem","hierarchy","powershell","recursion","registry","tree","tree-structure"],"created_at":"2024-08-01T17:00:36.429Z","updated_at":"2025-04-10T01:30:55.103Z","avatar_url":"https://github.com/santisq.png","language":"C#","funding_links":[],"categories":["C# #","csharp"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003ePSTree\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n   \u003csub\u003e\n\n   `tree` like cmdlets for PowerShell!\n   \u003c/sub\u003e\n\u003cbr/\u003e\u003cbr/\u003e\n\n[![build](https://github.com/santisq/PSTree/actions/workflows/ci.yml/badge.svg)](https://github.com/santisq/PSTree/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/santisq/PSTree/branch/main/graph/badge.svg?token=b51IOhpLfQ)](https://codecov.io/gh/santisq/PSTree)\n[![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/PSTree?color=%23008FC7)](https://www.powershellgallery.com/packages/PSTree)\n[![LICENSE](https://img.shields.io/github/license/santisq/PSTree)](https://github.com/santisq/PSTree/blob/main/LICENSE)\n\n\u003c/div\u003e\n\nPSTree is a PowerShell module that extends tree-style navigation to both file systems and the Windows Registry through two versatile cmdlets. Designed for administrators, developers, and power users, it combines hierarchical visualization with practical insights like folder sizes and registry traversal.\n\n## Cmdlets\n\n- **`Get-PSTree`**  \n  Inspired by the classic [`tree` command](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/tree), this cmdlet displays your file system in a structured hierarchy. It goes further by calculating folder sizes—both individual and recursive—making it a powerful tool for disk usage analysis.\n\n- **`Get-PSTreeRegistry`** *(Windows only)*  \n  Explore the Windows Registry with a tree-like view of keys and values. This cmdlet simplifies navigation and troubleshooting by presenting registry structures in an intuitive format, ideal for system configuration tasks.\n\n## Documentation\n\n- Learn how to use the cmdlets in the [official documentation](./docs/en-US/).\n\n- To Customize output rendering, see [about_TreeStyle](./docs/en-US/about_TreeStyle.md).\n\n## Installation\n\n### Gallery\n\nThe module is available through the [PowerShell Gallery](https://www.powershellgallery.com/packages/PSTree):\n\n```powershell\nInstall-Module PSTree -Scope CurrentUser\n```\n\n### Source\n\n```powershell\ngit clone 'https://github.com/santisq/PSTree.git'\nSet-Location ./PSTree\n./build.ps1\n```\n\n## Requirements\n\n- **Windows PowerShell v5.1** or [**PowerShell 7+**](https://github.com/PowerShell/PowerShell).\n- **Windows OS** (for `Get-PSTreeRegistry`).\n\n## Usage\n\n### `Get-PSTree`\n\n#### Get the current directory tree with default parameters values\n\n```powershell\nPS ..\\PSTree\u003e Get-PSTree | Select-Object -First 20\n\n   Source: C:\\User\\Documents\\PSTree\n\nMode            Length Hierarchy\n----            ------ ---------\nd----         36.78 KB PSTree\n-a---          4.75 KB ├── .gitignore        \n-a---        137.00  B ├── .markdownlint.json\n-a---          1.37 KB ├── build.ps1\n-a---         19.34 KB ├── CHANGELOG.md\n-a---          1.07 KB ├── LICENSE\n-a---         10.12 KB ├── README.md\nd----          0.00  B ├── .github\nd----          4.10 KB │   └── workflows\n-a---          4.10 KB │       └── ci.yml\nd----          4.18 KB ├── .vscode\n-a---        275.00  B │   ├── extensions.json\n-a---          1.39 KB │   ├── launch.json\n-a---          1.09 KB │   ├── settings.json\n-a---          1.43 KB │   └── tasks.json\nd----        266.71 KB ├── assets\n-a---         10.00 KB │   ├── EscapeSequence.png\n-a---         78.08 KB │   ├── Get-PSTree.After.png\n-a---         73.89 KB │   ├── Get-PSTree.Before.png\n-a---         34.54 KB │   ├── Get-PSTreeRegistry.After.png\n```\n\n#### Excludes items starting with `.g`, `.v`, `.m` and `assets`\n\n```powershell\nPS ..\\PSTree\u003e Get-PSTree -Exclude .[gvm]*, assets | Select-Object -First 20\n\n   Source: C:\\User\\Documents\\PSTree\n\nMode            Length Hierarchy\n----            ------ ---------\nd----         31.90 KB PSTree\n-a---          1.37 KB ├── build.ps1   \n-a---         19.34 KB ├── CHANGELOG.md\n-a---          1.07 KB ├── LICENSE\n-a---         10.12 KB ├── README.md\nd----          0.00  B ├── docs\nd----         31.99 KB │   └── en-US\n-a---          7.25 KB │       ├── about_TreeStyle.md\n-a---         13.25 KB │       ├── Get-PSTree.md\n-a---         10.49 KB │       ├── Get-PSTreeRegistry.md\n-a---          1.00 KB │       └── Get-PSTreeStyle.md\nd----         22.10 KB ├── module\n-a---         17.08 KB │   ├── PSTree.Format.ps1xml\n-a---          5.01 KB │   └── PSTree.psd1\nd----        513.42 KB ├── output\n-a---         22.70 KB │   ├── PSTree.2.1.11.nupkg\n-a---         24.21 KB │   ├── PSTree.2.1.12.nupkg\n-a---         24.22 KB │   ├── PSTree.2.1.13.nupkg\n-a---         24.42 KB │   ├── PSTree.2.1.14.nupkg\n-a---         25.07 KB │   ├── PSTree.2.1.15.nupkg\n```\n\n#### Includes `.ps1` and `.cs` files and excludes `tools` folder\n\n```powershell\nPS ..\\PSTree\u003e Get-PStree -Include *.ps1, *.cs -Exclude tools\n\n   Source: C:\\User\\Documents\\PSTree\n\nMode            Length Hierarchy\n----            ------ ---------\nd----          1.37 KB PSTree\n-a---          1.37 KB ├── build.ps1\nd----          0.00  B ├── src\nd----         15.87 KB │   └── PSTree\n-a---        839.00  B │       ├── Cache.cs\n-a---        169.00  B │       ├── ITree.cs\n-a---        674.00  B │       ├── RegistryMappings.cs\n-a---          1.02 KB │       ├── TreeBase.cs\n-a---          4.00 KB │       ├── TreeCommandBase.cs\n-a---        438.00  B │       ├── TreeComparer.cs\n-a---          2.27 KB │       ├── TreeDirectory.cs\n-a---          1.30 KB │       ├── TreeFile.cs\n-a---          1.68 KB │       ├── TreeFileSystemInfo_T.cs\n-a---        311.00  B │       ├── TreeFileSystemInfo.cs\n-a---        942.00  B │       ├── TreeRegistryBase.cs\n-a---          1.10 KB │       ├── TreeRegistryKey.cs\n-a---          1.21 KB │       └── TreeRegistryValue.cs\nd----         27.48 KB └── tests\n-a---        985.00  B     ├── FormattingInternals.tests.ps1\n-a---          6.13 KB     ├── GetPSTreeCommand.tests.ps1\n-a---          6.44 KB     ├── GetPSTreeRegistryCommand.tests.ps1\n-a---          1.77 KB     ├── TreeDirectory.tests.ps1\n-a---        914.00  B     ├── TreeFile.tests.ps1\n-a---          2.62 KB     ├── TreeFileSystemInfo_T.tests.ps1\n-a---          8.67 KB     └── TreeStyle.tests.ps1\n```\n\n#### Get the recursive size of the folders\n\n```powershell\nPS ..\\PSTree\u003e Get-PSTree .\\src\\ -Depth 2 -Directory -RecursiveSize\n\n   Source: C:\\User\\Documents\\PSTree\\src\n\nMode            Length Hierarchy\n----            ------ ---------\nd----          1.04 MB src\nd----          1.04 MB └── PSTree\nd----        670.05 KB     ├── bin\nd----          7.53 KB     ├── CodeAnalysis\nd----         10.58 KB     ├── Commands\nd----          8.01 KB     ├── Extensions\nd----          1.29 KB     ├── Internal\nd----        341.03 KB     ├── obj\nd----         11.69 KB     └── Style\n```\n\n### `Get-PSTreeRegistry`\n\n#### Get the tree-view of `HKCU:\\System`\n\n```powershell\nPS ..\\PSTree\u003e Get-PSTreeRegistry HKCU:\\System -Depth 2\n\n   Hive: HKEY_CURRENT_USER\\System\n\nKind         Hierarchy\n----         ---------\nRegistryKey  System\nRegistryKey  ├── GameConfigStore\nDWord        │   ├── GameDVR_Enabled\nDWord        │   ├── GameDVR_FSEBehaviorMode\nBinary       │   ├── Win32_AutoGameModeDefaultProfile\nBinary       │   ├── Win32_GameModeRelatedProcesses\nDWord        │   ├── GameDVR_HonorUserFSEBehaviorMode\nDWord        │   ├── GameDVR_DXGIHonorFSEWindowsCompatible\nDWord        │   ├── GameDVR_EFSEFeatureFlags\nRegistryKey  │   ├── Parents\nRegistryKey  │   └── Children\nRegistryKey  └── CurrentControlSet\nRegistryKey      ├── Policies\nRegistryKey      └── Control\n```\n\n#### Filter Out Specific Items from the `HKCU:\\System` Tree\n\n```powershell\nPS ..\\PSTree\u003e Get-PSTreeRegistry HKCU:\\System -Depth 2 -Exclude CurrentControlSet, GameDV*\n\n   Hive: HKEY_CURRENT_USER\\System\n\nKind         Hierarchy\n----         ---------\nRegistryKey  System\nRegistryKey  └── GameConfigStore\nBinary           ├── Win32_AutoGameModeDefaultProfile\nBinary           ├── Win32_GameModeRelatedProcesses\nRegistryKey      ├── Parents\nRegistryKey      └── Children\n```\n\n#### Select GameDVR-Related Values in the `HKCU:\\System` Tree\n\n```powershell\nPS ..\\PSTree\u003e Get-PSTreeRegistry HKCU:\\System -Depth 2 -Include GameDVR*\n\n   Hive: HKEY_CURRENT_USER\\System\n\nKind         Hierarchy\n----         ---------\nRegistryKey  System\nRegistryKey  └── GameConfigStore\nDWord            ├── GameDVR_Enabled\nDWord            ├── GameDVR_FSEBehaviorMode\nDWord            ├── GameDVR_HonorUserFSEBehaviorMode\nDWord            ├── GameDVR_DXGIHonorFSEWindowsCompatible\nDWord            └── GameDVR_EFSEFeatureFlags\n```\n\n#### Show only Keys\n\n```powershell\nPS ..\\PSTree\u003e Get-PSTreeRegistry HKCU:\\System -Depth 2 -KeysOnly\n\n   Hive: HKEY_CURRENT_USER\\System\n\nKind         Hierarchy\n----         ---------\nRegistryKey  System\nRegistryKey  ├── GameConfigStore\nRegistryKey  │   ├── Parents\nRegistryKey  │   └── Children\nRegistryKey  └── CurrentControlSet\nRegistryKey      ├── Policies\nRegistryKey      └── Control\n```\n\n#### Get the value of a `TreeRegistryValue` item\n\n```powershell\nPS ..\\PSTree\u003e $items = Get-PSTreeRegistry HKCU:\\Environment\\ -Depth 2\nPS ..\\PSTree\u003e $values = $items | Where-Object { $_ -is [PSTree.TreeRegistryValue] }\nPS ..\\PSTree\u003e $values\n\n   Hive: HKEY_CURRENT_USER\\Environment\n\nKind         Hierarchy\n----         ---------\nExpandString ├── Path\nExpandString ├── TEMP\nExpandString └── TMP\n\nPS ..\\PSTree\u003e $values[1].GetValue()\nC:\\Users\\User\\AppData\\Local\\Temp\n```\n\n## Changelog\n\n- [CHANGELOG.md](CHANGELOG.md)\n- [Releases](https://github.com/santisq/PSTree/releases)\n\n## Contributing\n\nContributions are welcome, if you wish to contribute, fork this repository and submit a pull request with the changes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsantisq%2FPSTree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsantisq%2FPSTree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsantisq%2FPSTree/lists"}