If you’ve ever wanted to add columns for unlisted attributes to Active Directory Users and Computers, you’ve been out of luck without editing the displaySpecifiers manually.
Until I had enough of it.
How does it work? I’m so glad you asked. So, if you’re not familiar with the functionality that I’m talking about, open up Active Directory Users and Computers (or ADUC, since we make acronyms out of every damn thing), select an OU, right-click, point to View and then click Add/Remove Columns.
From here, you’ll see the familiar list of column titles that you can add to the view.
So what happens when the column you want to view isn’t there? You’re SOL, right?
Not exactly. Crack open ADSIEdit.msc and let’s go exploring. You’ll want to connect to the configuration container, and then expand the Configuration Naming Context, expand CN=Configuration,DC=domain,dc=com, expand CN=DisplaySpecifiers and select CN=organizationalUnit-Display in the main window.
Double-click CN=organiztionalUnit-Display and scroll down to extraColumns. This is where you can add items to display in ADUC. You’ll notice that by default, it is null (<not set>).
This is a multivalued attribute, and the format is:
attributeName,Attribute Column Title,<visibility>,<width>,<reserved>
So, if you wanted to add extensionAttribute1 and have the column name display as “Extension Attribute 1,” set the visibility to “True” (which will equate to “always on”), and the column width to auto, it would look like this:
Click add, and OK. Piece of cake, right?
WRONG AGAIN, BOBBY BOUCHER!
After you close and reopen ADUC, you’ll see that you now can ONLY select that column and a few base properties, but all of the others have disappeared.
Great job, Aaron! Now you’ve really messed it up.
What happened? When you populate the extraColumns attribute, that becomes the authoritative list for additional properties to surface in ADUC. How do we fix it?
- Go back to ADSIEdit.
- Clear the extraColumns attribute for CN=organizationalUnit-Display.
- Run the script I wrote.
So what’s special about the script I wrote? It pulls in all of the display specifiers in cn=default-Display and then adds your new one. Here’s what it looks like:
Now, when you close and re-run ADUC, you’ll see all of the properties you previously had available.
And there you go. You can get this latest installment of wizardry by going to the Technet Gallery or following the link below. Happy modding!