Calling ADUC A Duck
A nifty list of graphical-to-schema mappings for the ADUC console.
One of the most common questions that pops up in the forums on ScriptingAnswers.com
is "what ADSI attribute corresponds to the insert-property-name-here property in Active Directory Users and Computers?"
In other words, if you’re looking at a user, group, or something else in the AD Users and Computers console, and you’ve found some property you want to change by using a script, what does ADSI call that property within the AD schema? It’s not always obvious: The "last name" field in the console, for example, corresponds to the "sn" (which stands for surname) property in the schema.
Fortunately, it's Microsoft to the rescue with http://msdn.microsoft.com/library/default.asp?url=/library/ en-us/ad/ad/mappings_for_the_active_directory_ users_and_computers_snap-in.asp, a complete list of graphical-to-schema mappings for the AD Users and Computers console. You’ll get mappings for just about every AD object type, and you can learn, for example, that the "office" textbox in the console corresponds to the "physicalDeliveryOfficeName" attribute in the schema. Naturally—I mean, what else would it be, right?
Some of the properties’ names are so non-intuitive, I don’t know how else you’d discover them. For example, the "Web Page" field is named obviously enough: "wwwHomePage." But the "Web Page: Other" field is just "url." Oooo-kay. Anyway, with Microsoft’s convenient mapping pages, you can take the trial-and-error out of your ADSI scripting.
Hey, be sure to check out my new "Scripting News" podcast, available on Apple iTunes and on ScriptingAnswers.com. News, interviews, and more, all about Windows administrative scripting.
Don Jones is a multiple-year recipient of Microsoft’s MVP Award, and is an Author/Evangelist for video training company Pluralsight. Don is also a co-founder and President of PowerShell.org, a community dedicated to Microsoft’s Windows PowerShell technology. Don has more than two decades of experience in the IT industry, and specializes in the Microsoft business technology platform. He’s the author of more than 50 technology books, an accomplished IT journalist, and a sought-after speaker and instructor at conferences worldwide. Reach Don on Twitter at @concentratedDon, or on Facebook at Facebook.com/ConcentratedDon.