active-directory-automation

Automates Active Directory user, group, GPO, and SMB share management with PowerShell.

5|15|Updated Jul 8, 2026
One-click install
npx skills add https://github.com/clfigueiredo/hermes-infra-skills --skill active-directory-automation-clfigueiredo
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: active-directory-automation
Source: https://github.com/clfigueiredo/hermes-infra-skills/tree/main/.hermes/skills/curso-hermes/active-directory-automation
Command: npx skills add https://github.com/clfigueiredo/hermes-infra-skills --skill active-directory-automation-clfigueiredo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Manually creating Active Directory users, assigning groups, linking GPOs, and configuring SMB/NTFS permissions is repetitive and error-prone. This Skill generates safe, idempotent PowerShell automation for these tasks with built-in validation before and after every change. ## Core Features & Use Cases - User and Group Automation: Create users with New-ADUser, set secure initial passwords with forced change at logon, and add users to groups with Add-ADGroupMember. - GPO Management: Create and link GPOs to OUs with New-GPO and New-GPLink, inspect inheritance with Get-GPInheritance, and validate with gpresult. - File Share Provisioning: Create per-user folders, SMB shares with New-SmbShare, and apply least-privilege NTFS permissions via icacls. - Use Case: A new employee joins the finance department. Provide the name, login, OU, and groups, and the Skill produces an idempotent PowerShell script that creates the account, adds group memberships, provisions a home folder with correct SMB/NTFS permissions, and runs validation checks. ## Quick Start Ask the assistant to generate an idempotent PowerShell script that creates an AD user, adds them to specified groups, and provisions a secured SMB home folder with validation steps.

Frequently Asked Questions about active-directory-automation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate Active Directory user creation with PowerShell?▼

Use New-ADUser with parameters for name, SamAccountName, UPN, OU path, and a secure initial password with ChangePasswordAtLogon enabled. The Skill generates idempotent scripts that first check whether the user already exists with Get-ADUser before creating anything.

How to create a GPO and link it to an OU in PowerShell?▼

Use New-GPO to create the policy and New-GPLink to bind it to the target OU, after checking existing links with Get-GPInheritance. Validate application on clients with gpupdate /force and gpresult /r, and avoid modifying Default Domain Policy without approval.

Does this work without the ActiveDirectory PowerShell module?▼

No, the scripts require the ActiveDirectory module from RSAT and the GroupPolicy module for GPO operations. Running PowerShell without these modules installed will fail, so verify availability with Get-Command before executing.

Why does a user still get access denied after SMB share permission is granted?▼

SMB share permissions and NTFS permissions are separate layers, and both must allow access. Grant-SmbShareAccess only configures the share; you must also set NTFS ACLs with icacls or Set-Acl, since the most restrictive of the two wins.

What are the safety limits of this Active Directory automation?▼

The Skill never requests real passwords in chat, never invents domain, OU, or group names, and requires human confirmation before any production change. It also avoids destructive operations and broad permissions like write access for Domain Users.