Automation · Active Directory Automation
PowerShell AD Module
Cheat sheet · https://pcornel.dk/topic.php?topic=5695
Answer
The PowerShell ActiveDirectory module (part of RSAT) provides cmdlets such as Get-ADUser, New-ADUser, Set-ADGroup and Search-ADAccount for reading and changing AD from scripts.
Remember
- Installed with RSAT or on DCs.
- Uses Active Directory Web Services on DCs.
- Filters run server-side; use them.
First checks
Get-Command -Module ActiveDirectory | measure— cmdletsGet-ADDomain— domain info- -Server <dc> to target a DC — consistency
Verify in this order
cmdlet → ADWS (9389) → DC
Where it usually breaks
Script/input → command/module binding → local/remoting session → request accepted → command result → target object read-back → effective runtime state → workload.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5695