Skip to content

Active Directory Command Line Tools

There are different ways to add, edit, move or remove users (or objects) in Active Directory. This page lists some older, but still relative command line tools to do so. Please note that PowerShell has more funtionality, but if you only need a few simple functions, these will work as well and are simpler to use.

ToolFunctieVoorbeeld
dsaddAdd objectsdsadd user "CN=Jan Jansen,OU=Users,DC=example,DC=com" -samid jjansen -pwd P@ssw0rd123 -memberof "CN=Domain Admins,CN=Users,DC=example,DC=com"
dsmodEdit objectdsmod user "CN=Jan Jansen,OU=Users,DC=example,DC=com" -dept "IT" -title "Engineer"
dsquerySearch objectsdsquery user -name "Jan*"
dsmoveMove or rename objectsdsmove "CN=Jan Jansen,OU=Users,DC=example,DC=com" -newparent "OU=Managers,DC=example,DC=com"
csvdeImport/Export CSVExport: csvde -f export.csv -r "(objectClass=user)"
Import: csvde -i -f import.csv
ldifdeImport/Export LDIFExport: ldifde -f export.ldf -d "DC=example,DC=com" -p subtree
Import: ldifde -i -f import.ldf