Posted on 2009-04-14
I need to change the displayname attribute of every user in my active directory structure. I was going to us dsquery and pipe the results to dsmod, but I need to know if I can use active directory attributes to define what I want changed. For instance I was thinking:
dsquery user "ou=my ou,dc=mycompany,dc=com" | dsmod user -display lastname & firstname
but obviously I don't know how to pull the attributes for the firstname and lastname in ad. Does anybody know?