microsoft/ActiveDirectoryTierModel ? reverse-engineered prompt

Reverse engineered prompt

Build me a PowerShell project that can deploy and audit an Active Directory Tier Model from one version controlled JSON config file.

I want it to create the core AD structure for Tier 0, Tier 1, and Tier 2, including OUs, groups, users, ACL delegations, and GPOs, with optional support for managed service account permissions and Windows LAPS permissions. It should be safe to run more than once, so repeated runs do not make a mess, and it should support a what if mode before applying changes. I also want a separate audit script that checks the current state against the expected state and reports drift clearly.

Please make it test driven, with strong automated tests and mock based testing so it can be validated without needing a live domain for everything. Keep the configuration and behavior reproducible, include good logging, and make sure the build is focused on security and stability. If you need current PowerShell or Windows docs, look them up online first.