{"id":23379009,"url":"https://github.com/santisq/psadtree","last_synced_at":"2025-07-28T19:33:16.091Z","repository":{"id":45272789,"uuid":"320603098","full_name":"santisq/PSADTree","owner":"santisq","description":"tree like cmdlets for Active Directory Principals!","archived":false,"fork":false,"pushed_at":"2024-09-07T18:07:44.000Z","size":4171,"stargazers_count":24,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T20:54:50.257Z","etag":null,"topics":["active-directory","csharp","hierarchy","powershell","recursion","tree","tree-structure"],"latest_commit_sha":null,"homepage":"","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":null,"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,"zenodo":null}},"created_at":"2020-12-11T14:54:39.000Z","updated_at":"2025-02-27T14:31:51.000Z","dependencies_parsed_at":"2023-01-19T07:00:50.141Z","dependency_job_id":"6c222078-f0f2-4534-85b0-cb967fcda95d","html_url":"https://github.com/santisq/PSADTree","commit_stats":null,"previous_names":["santisq/psadtree","santysq/get-hierarchy"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/santisq/PSADTree","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santisq%2FPSADTree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santisq%2FPSADTree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santisq%2FPSADTree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santisq%2FPSADTree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/santisq","download_url":"https://codeload.github.com/santisq/PSADTree/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santisq%2FPSADTree/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267574204,"owners_count":24109928,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["active-directory","csharp","hierarchy","powershell","recursion","tree","tree-structure"],"created_at":"2024-12-21T19:16:09.877Z","updated_at":"2025-07-28T19:33:16.030Z","avatar_url":"https://github.com/santisq.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003ePSADTree\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003csub\u003eTree like cmdlets for Active Directory Principals!\u003c/sub\u003e\n\u003cbr /\u003e\u003cbr /\u003e\n\n[![build](https://github.com/santisq/PSADTree/actions/workflows/ci.yml/badge.svg)](https://github.com/santisq/PSADTree/actions/workflows/ci.yml)\n[![PowerShell Gallery](https://img.shields.io/powershellgallery/v/PSADTree?label=gallery)](https://www.powershellgallery.com/packages/PSADTree)\n[![LICENSE](https://img.shields.io/github/license/santisq/PSADTree)](https://github.com/santisq/PSADTree/blob/main/LICENSE)\n\n\u003c/div\u003e\n\nPSADTree is a PowerShell Module with cmdlets that emulate the [`tree` command](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/tree) for Active Directory Principals.  \nThis Module currently includes two cmdlets:\n\n- [Get-ADTreeGroupMember](docs/en-US/Get-ADTreeGroupMember.md) for AD Group Members.\n- [Get-ADTreePrincipalGroupMembership](docs/en-US/Get-ADTreePrincipalGroupMembership.md) for AD Principal Group Membership.\n\n__Both cmdlets help with discovery of Circular Nested Groups.__\n\n## Documentation\n\nCheck out [__the docs__](./docs/en-US/PSADTree.md) for information about how to use this Module.\n\n## Installation\n\n### Gallery\n\nThe module is available through the [PowerShell Gallery](https://www.powershellgallery.com/packages/PSADTree):\n\n```powershell\nInstall-Module PSADTree -Scope CurrentUser\n```\n\n### Source\n\n```powershell\ngit clone 'https://github.com/santisq/PSADTree.git'\nSet-Location ./PSADTree\n./build.ps1\n```\n\n## Requirements\n\nThis Module uses the [`System.DirectoryServices.AccountManagement` Namespace](https://learn.microsoft.com/en-us/dotnet/api/system.directoryservices.accountmanagement?view=dotnet-plat-ext-7.0) to query Active Directory, its System Requirement is __Windows OS__ and is compatible with __Windows PowerShell v5.1__ or [__PowerShell 7+__](https://github.com/PowerShell/PowerShell).\n\n## Usage\n\nThese are some examples of what the cmdlets from this Module allow you to do. For more examples check out the docs.\n\n### Get the members of a group\n\n```powershell\nPS ..\\PSADTree\u003e Get-ADTreeGroupMember TestGroup007\n\n   Source: CN=TestGroup007,OU=Operations,DC=ChildDomain,DC=ParentDomain,DC=myDomain,DC=xyz\n\nDomain                              ObjectClass Hierarchy\n------                              ----------- ---------\nChildDomain                               group TestGroup007\nChildDomain          msDS-ManagedServiceAccount ├── testMSA$\nChildDomain                                user ├── TestUser013\nChildDomain                                user ├── TestUser010\nChildDomain                                user ├── TestUser007\nChildDomain                               group ├── TestGroup001\nChildDomain                                user │   ├── TestUser015\nChildDomain                                user │   ├── TestUser013\nChildDomain                                user │   ├── TestUser010\nChildDomain                                user │   ├── TestUser007\nChildDomain                                user │   ├── TestUser002\nChildDomain                               group │   ├── TestGroup005\nParentDomain                              group │   │   ├── TestGroup001\nParentDomain                              group │   │   └── TestGroup002\nChildDomain                               group │   ├── TestGroup006\nChildDomain                            computer │   │   ├── TestComputer0000004$\nChildDomain                            computer │   │   ├── TestComputer0000003$\nChildDomain                            computer │   │   ├── TestComputer0000002$\nChildDomain                            computer │   │   └── TestComputer0000001$\nChildDomain                               group │   └── TestGroup007 ↔ Circular Reference\nChildDomain                               group ├── TestGroup005 ↔ Processed Group\nChildDomain                               group └── TestGroup006 ↔ Processed Group\n```\n\n### Control the grade of recursion with the `-Depth` parameter\n\nThe default value for `-Depth` is 3.\n\n```powershell\nPS ..\\PSADTree\u003e Get-ADTreeGroupMember TestGroup007 -Depth 2\n\n   Source: CN=TestGroup007,OU=Operations,DC=ChildDomain,DC=ParentDomain,DC=myDomain,DC=xyz\n\nDomain                        ObjectClass Hierarchy\n------                        ----------- ---------\nChildDomain                         group TestGroup007\nChildDomain    msDS-ManagedServiceAccount ├── testMSA$\nChildDomain                          user ├── TestUser013\nChildDomain                          user ├── TestUser010\nChildDomain                          user ├── TestUser007\nChildDomain                         group ├── TestGroup001\nChildDomain                          user │   ├── TestUser015\nChildDomain                          user │   ├── TestUser013\nChildDomain                          user │   ├── TestUser010\nChildDomain                          user │   ├── TestUser007\nChildDomain                          user │   ├── TestUser002\nChildDomain                         group │   ├── TestGroup005\nChildDomain                         group │   ├── TestGroup006\nChildDomain                         group │   └── TestGroup007 ↔ Circular Reference\nChildDomain                         group ├── TestGroup005 ↔ Processed Group\nChildDomain                         group └── TestGroup006 ↔ Processed Group\n```\n\n### Get group members recursively, include only groups and display all processed groups\n\nThe `-Recursive` switch indicates that the cmdlet should traverse all the group hierarchy.  \nThe `-Group` switch limits the members tree view to nested groups only.  \nBy default, previously processed groups will be marked as _\"Processed Group\"_ and their hierarchy will not be displayed.  \nThe `-ShowAll` switch indicates that the cmdlet should display the hierarchy of all previously processed groups.  \n\n```powershell\nPS ..\\PSADTree\u003e Get-ADTreeGroupMember TestGroup007 -Recursive -Group -ShowAll\n\n   Source: CN=TestGroup007,OU=Operations,DC=ChildDomain,DC=ParentDomain,DC=myDomain,DC=xyz\n\nDomain         ObjectClass Hierarchy\n------         ----------- ---------\nChildDomain          group TestGroup007\nChildDomain          group ├── TestGroup001\nChildDomain          group │   ├── TestGroup005\nParentDomain         group │   │   ├── TestGroup001\nParentDomain         group │   │   │   └── TestGroup002\nParentDomain         group │   │   └── TestGroup002\nChildDomain          group │   ├── TestGroup006\nChildDomain          group │   └── TestGroup007 ↔ Circular Reference\nChildDomain          group ├── TestGroup005\nParentDomain         group │   ├── TestGroup001\nParentDomain         group │   │   └── TestGroup002\nParentDomain         group │   └── TestGroup002\nChildDomain          group └── TestGroup006\n```\n\n### Get group memberships for a user\n\n```powershell\nPS ..\\PSADTree\u003e Get-ADTreePrincipalGroupMembership TestUser002\n\n   Source: CN=TestUser002,OU=Operations,DC=ChildDomain,DC=ParentDomain,DC=myDomain,DC=xyz\n\nDomain         ObjectClass Hierarchy\n------         ----------- ---------\nChildDomain           user TestUser002\nChildDomain          group ├── TestGroup003\nChildDomain          group │   └── TestGroup000\nChildDomain          group ├── TestGroup001\nChildDomain          group │   ├── TestGroup007\nChildDomain          group │   │   ├── TestGroup004\nChildDomain          group │   │   ├── TestGroup002\nChildDomain          group │   │   └── TestGroup001 ↔ Circular Reference\nChildDomain          group │   └── TestGroup000 ↔ Processed Group\nChildDomain          group ├── Terminal Server License Servers\nChildDomain          group └── Domain Users\nChildDomain          group     └── Users\n```\n\n### Control the grade of recursion with the `-Depth` parameter\n\nSame as `Get-ADTreeGroupMember`, the default depth to display the principal memberships is 2.\n\n```powershell\nPS ..\\PSADTree\u003e Get-ADTreePrincipalGroupMembership TestUser002 -Depth 2\n\n   Source: CN=TestUser002,OU=Operations,DC=ChildDomain,DC=ParentDomain,DC=myDomain,DC=xyz\n\nDomain         ObjectClass Hierarchy\n------         ----------- ---------\nChildDomain           user TestUser002\nChildDomain          group ├── TestGroup003\nChildDomain          group │   └── TestGroup000\nChildDomain          group ├── TestGroup001\nChildDomain          group │   ├── TestGroup007\nChildDomain          group │   └── TestGroup000 ↔ Processed Group\nChildDomain          group ├── Terminal Server License Servers\nChildDomain          group └── Domain Users\nChildDomain          group     └── Users\n```\n\n### Get the user principal membership recursively and display all processed groups\n\n```powershell\nPS ..\\PSADTree\u003e Get-ADTreePrincipalGroupMembership TestUser002 -Recursive -ShowAll\n\n   Source: CN=TestUser002,OU=Operations,DC=ChildDomain,DC=ParentDomain,DC=myDomain,DC=xyz\n\nDomain         ObjectClass Hierarchy\n------         ----------- ---------\nChildDomain           user TestUser002\nChildDomain          group ├── TestGroup003\nChildDomain          group │   └── TestGroup000\nChildDomain          group ├── TestGroup001\nChildDomain          group │   ├── TestGroup007\nChildDomain          group │   │   ├── TestGroup004\nChildDomain          group │   │   ├── TestGroup002\nChildDomain          group │   │   │   └── TestGroup000\nChildDomain          group │   │   └── TestGroup001 ↔ Circular Reference\nChildDomain          group │   └── TestGroup000\nChildDomain          group ├── Terminal Server License Servers\nChildDomain          group └── Domain Users\nChildDomain          group     └── Users\n```\n\n## Contributing\n\nContributions are more than 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%2Fpsadtree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsantisq%2Fpsadtree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsantisq%2Fpsadtree/lists"}