<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/ad-genesis-automating-active-directory-provisioning-and-workstation-administration-with-powershell-lnovrvyds" -->

---
title: AD Genesis: Automating Active Directory Provisioning and...
description: AD Genesis is a PowerShell project that automates Active Directory user and group provisioning and local Administrator assignments across multiple...
canonical: https://daily.dev/posts/ad-genesis-automating-active-directory-provisioning-and-workstation-administration-with-powershell-lnovrvyds
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: AD Genesis: Automating Active Directory Provisioning and Workstation Administration with PowerShell | daily.dev
og:description: AD Genesis is a PowerShell project that automates Active Directory user and group provisioning and local Administrator assignments across multiple...
og:url: https://daily.dev/posts/ad-genesis-automating-active-directory-provisioning-and-workstation-administration-with-powershell-lnovrvyds
og:image: https://api.daily.dev/og/posts/lNOVrVyDs.png
og:image:alt: AD Genesis: Automating Active Directory Provisioning and Workstation Administration with PowerShell
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# AD Genesis: Automating Active Directory Provisioning and Workstation Administration with PowerShell

**[InfoSec Write-ups](https://daily.dev/sources/infosecwriteups)** · 13 min read · 0 upvotes · 0 comments

## Summary

AD Genesis is a PowerShell project that automates Active Directory user and group provisioning and local Administrator assignments across multiple workstations. randomDomain.ps1 generates a randomized JSON config of users, groups, passwords and admin assignments. genAD.ps1 reads that JSON and provisions the domain. Workstation changes run directly from the Management Client over PowerShell Remoting, which avoids the second-hop credential problem. An Undo mode removes only objects marked 'Created by genAD.ps1'. Generated JSON holds plaintext passwords, so the project is meant for isolated labs only.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://infosecwriteups.com/ad-genesis-automating-active-directory-provisioning-and-workstation-administration-with-powershell-dc31e5d3bb9b>

## Questions this post answers

### How do I avoid the PowerShell Remoting second-hop problem when changing local Administrators on workstations from a management client?

Run workstation operations directly from the Management Client to each workstation over PowerShell Remoting, instead of chaining through the Domain Controller. The MC to DC to WS path fails because credentials from the first connection are not delegated to the second hop. AD Genesis splits MC to DC and MC to WS paths for this reason.

_Developers automating Windows admin follow remoting and credential-delegation pitfalls like this on daily.dev._

### How can I safely undo users and groups created by a PowerShell Active Directory provisioning script?

Mark every created object with a description such as 'Created by genAD.ps1' and have the cleanup pass remove only objects carrying that marker. AD Genesis's Undo mode checks users exist, verifies the marker, removes local Administrator memberships on workstations, then deletes users and groups. Keep the original JSON config until cleanup finishes.

_Engineers scripting identity automation pick up safe-cleanup patterns on daily.dev._

## Similar posts on daily.dev

- [Analyzing Vibe-Coded AD Enumeration](https://daily.dev/posts/analyzing-vibe-coded-ad-enumeration-riuoelkq3) · Huntress Blog · 0 upvotes · 0 comments
- [How to manage Ubuntu fleets using on-premises Active Directory and ADSys](https://daily.dev/posts/how-to-manage-ubuntu-fleets-using-on-premises-active-directory-and-adsys-zr406t1la) · Ubuntu · 0 upvotes · 0 comments
- [ShadowGate Active Directory Lab Walkthrough \[HackSmarter\]](https://daily.dev/posts/shadowgate-active-directory-lab-walkthrough-hacksmarter--ovegbtw2c) · InfoSec Write-ups · 1 upvotes · 0 comments
- [AWS Managed Microsoft AD adds Multi-Region replication for Opt-In regions](https://daily.dev/posts/aws-managed-microsoft-ad-adds-multi-region-replication-for-opt-in-regions-h2jkfvldf) · AWS · 0 upvotes · 0 comments

---

Tags: [#microsoft](https://daily.dev/tags/microsoft), [#automation](https://daily.dev/tags/automation), [#powershell](https://daily.dev/tags/powershell), [#active-directory](https://daily.dev/tags/active-directory)

[View this post on daily.dev](https://daily.dev/posts/ad-genesis-automating-active-directory-provisioning-and-workstation-administration-with-powershell-lnovrvyds)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"AD Genesis: Automating Active Directory Provisioning and Workstation Administration with PowerShell","url":"https://daily.dev/posts/ad-genesis-automating-active-directory-provisioning-and-workstation-administration-with-powershell-lnovrvyds","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/ad-genesis-automating-active-directory-provisioning-and-workstation-administration-with-powershell-lnovrvyds"},"datePublished":"2026-11-30T07:47:53.170Z","dateModified":"2026-11-30T07:48:15.418Z","description":"AD Genesis is a PowerShell project that automates Active Directory user and group provisioning and local Administrator assignments across multiple...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/a5a15f38b4150f67bdbd7b85d53a71db?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/a5a15f38b4150f67bdbd7b85d53a71db?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"InfoSec Write-ups","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"InfoSec Write-ups","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/f0dc21b5bbfd46fda36f7b4b53dd1705","url":"https://daily.dev/sources/infosecwriteups"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/ad-genesis-automating-active-directory-provisioning-and-workstation-administration-with-powershell-lnovrvyds","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"microsoft,automation,powershell,active-directory","timeRequired":"PT13M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"InfoSec Write-ups","item":"https://daily.dev/sources/infosecwriteups"},{"@type":"ListItem","position":3,"name":"AD Genesis: Automating Active Directory Provisioning and Workstation Administration with PowerShell"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/ad-genesis-automating-active-directory-provisioning-and-workstation-administration-with-powershell-lnovrvyds#faq","mainEntity":[{"@type":"Question","name":"How do I avoid the PowerShell Remoting second-hop problem when changing local Administrators on workstations from a management client?","acceptedAnswer":{"@type":"Answer","text":"Run workstation operations directly from the Management Client to each workstation over PowerShell Remoting, instead of chaining through the Domain Controller. The MC to DC to WS path fails because credentials from the first connection are not delegated to the second hop. AD Genesis splits MC to DC and MC to WS paths for this reason. Developers automating Windows admin follow remoting and credential-delegation pitfalls like this on daily.dev."}},{"@type":"Question","name":"How can I safely undo users and groups created by a PowerShell Active Directory provisioning script?","acceptedAnswer":{"@type":"Answer","text":"Mark every created object with a description such as 'Created by genAD.ps1' and have the cleanup pass remove only objects carrying that marker. AD Genesis's Undo mode checks users exist, verifies the marker, removes local Administrator memberships on workstations, then deletes users and groups. Keep the original JSON config until cleanup finishes. Engineers scripting identity automation pick up safe-cleanup patterns on daily.dev."}}]}
```

