PDF Print E-mail

Active Directory Command Line Tools

Written by Daniel Mundy
Sunday, 10 May 2009 13:04

Dsmod

Dsmod - modifies the attributes of one or more existing AD objects. Type dsmod user /? for syntax and more information on which attributes can be modified. eg. dsmod user "cn=Daniel Mundy,ou=People,dc=mundy,dc=net,dc=au" -office "Adelaide"

You can pipe DNs to dsmod like so: dsquery user -name "* Mundy" | dsmod user -office "Adelaide"

Another more powerful example of changing all home directories: dsquery user "ou=People,dc=mundy,dc=net,dc=au" | dsmod user -hmdir "\\server01\users\%username%\documents" -hmdrv "U:"

 

Dsget

Dsget gets attributes from one or more objects. eg. dsget user "cn=Daniel Mundy,ou=People,dc=mundy,dc=net,dc=au" -samid or to get the pre-Windows 2000 logon name of all account in the OU, dsquery user -office "Adelaide" | dsget user -samid

Trackback(0)
Comments (0)Add Comment

Write comment

busy
Last Updated on Sunday, 30 May 2010 08:43
 

Are you stuck?

This tech stuff isn't for everyone. If you'd rather just pay someone to fix it for you, email daniel@mundy.com.au.
I'll be happy to help you.


Daniel Mundy