{"id":20680284,"url":"https://github.com/markwragg/test-activedirectory","last_synced_at":"2025-04-19T23:55:11.234Z","repository":{"id":90780553,"uuid":"60697267","full_name":"markwragg/Test-ActiveDirectory","owner":"markwragg","description":"Test and auditing Powershell and Pester scripts for Active Directory","archived":false,"fork":false,"pushed_at":"2020-02-25T15:06:51.000Z","size":31,"stargazers_count":66,"open_issues_count":2,"forks_count":26,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-19T23:55:06.917Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markwragg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"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":"2016-06-08T12:47:49.000Z","updated_at":"2025-03-28T17:22:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"9e8ac208-bd2b-41f4-bc07-d19ce37cbcf6","html_url":"https://github.com/markwragg/Test-ActiveDirectory","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markwragg%2FTest-ActiveDirectory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markwragg%2FTest-ActiveDirectory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markwragg%2FTest-ActiveDirectory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markwragg%2FTest-ActiveDirectory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markwragg","download_url":"https://codeload.github.com/markwragg/Test-ActiveDirectory/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249830852,"owners_count":21331357,"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":[],"created_at":"2024-11-16T21:30:46.841Z","updated_at":"2025-04-19T23:55:11.227Z","avatar_url":"https://github.com/markwragg.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Test-ActiveDirectory\n\n[![Build status](https://ci.appveyor.com/api/projects/status/nq1lqjp6ibbc52uy?svg=true)](https://ci.appveyor.com/project/markwragg/test-activedirectory) ![Test Coverage](https://img.shields.io/badge/coverage-91%25-brightgreen.svg?maxAge=60) \n\nThis project contains a PowerShell module named ADAudit with cmdlets for retrieving and exporting detailed information about the configuration of an Active Directory forest. The module also contains a set of Pester tests that can be used to validate whether any configuration drift has occurred as well as perform a series of health tests of AD.\n\nThe validation of AD configuration drifts works by you initially using `Get-ADConfig | Export-ADConfig -AsGoldConfig` to generate a current \"known-good state\" snapshot of the configuration of AD. After this you can use `Test-ActiveDirectory`, or run the `ActiveDirectory.tests.ps1` file directly to compare the known good state to the current AD state (or a previously retrieved snapshot of the state).\n\n\u003e This code builds on the Active Directory Operational Test work of Irwin Strachan [(@IrwinStrachan)](https://twitter.com/IrwinStrachan) which he has detailed here:\n\u003e\n\u003e - https://pshirwin.wordpress.com/2016/04/08/active-directory-operations-test/\n\n## Installation\n\nThis module is published in the PowerShell Gallery, so can be installed via:\n\n```\nInstall-Module ADAudit -Scope CurrentUser\n```\n## Requirements\n\nThis module requires the following modules be installed/available:\n\n- ActiveDirectory\n- Pester\n\n## Cmdlets\n\n### `Get-ADConfig`\n\nExecute to retrieve the current AD configuration as a PowerShell object.\n\n### `Export-ADConfig`\n\nUse to export the current AD configuration to an XML file. If you're saving the current known-good state, use `-AsGoldConfig` to have the exported configuration prefixed with `GoldConfig-`.\n\n### `Test-ActiveDirectory` or `ActiveDirectory.tests.ps1`\n\nExecute to perform the following tests:\n\n**Active Directory configuration checks**\n- Various checks of the config between what has been stored previously and what has been captured now to detect configuration drift.\n\n**Active Directory health checks**\n- Runs NLTest /Query and checks the output for \"Success\"\n- Runs DCDiag -a and checks the output for \"failed\"\n- Runs RepAdmin /showrepl and checks each replication for the \"Number of Failures\" count being \u003e 0\n- Performs a Ping against each listed DC (per config)\n- Tests that common AD ports respond locally: (53,88,135,139,389,445,464,636,3268,3269,9389)\n- Checks that common AD services are running: (\"ADWS\",\"BITS\",\"CertPropSvc\",\"CryptSvc\",\"Dfs\",\"DFSR\",\"DNS\",\"Dnscache\",\"eventlog\",\"gpsvc\",\"kdc\",\"LanmanServer\",\"LanmanWorkstation\",\"Netlogon\",\"NTDS\",\"NtFrs\",\"RpcEptMapper\",\"RpcSs\",\"SamSs\",\"W32Time\")\n- Checks the SRV DNS records for _ldap.tcp.domainname and _kerberos.tcp.domainname\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkwragg%2Ftest-activedirectory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkwragg%2Ftest-activedirectory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkwragg%2Ftest-activedirectory/lists"}