Add additional column to Active Directory for Papercut ID

I needed a column added to AD so I can see the 4 digit Papercut ID my users are using to print. With some tools and a bit of code I got it working.

Add additional column to Active Directory for Papercut ID

At work, I manage our Active Directory, Azure Directory (Microsoft Entra ID), and Google Directory (they all sync between one another, but that’s for another post). We use Papercut as our print management system. It deploys printers and drivers for Mac and Windows and deals with who is printing to what, what department, and budget should they be printing to. It's rad, and I love how much easier it makes my job.

In order to know who is printing and copying on our devices, we have to offer up a few ways of authentication. Using AD credentials is one way; we do SSO for single sign-on between Windows and a web service, and we use that for authenticating in the 2 apps we use from Papercut to know who is printing. Mac is the same thing using a web app to log in. But what about standing in front of a printer and printing? We're not the company that wears name badges; we may at some point, so I'm future-proofing a little bit here. I use the "pager" field in AD in the users’ account to store their code for printing; the user knows the code, and when they walk up to the printer, they input the code, and it greets them and asks what subaccount in their budget they want to charge a printout to. It's fancy and makes the Accounting department happy.

The problem I was running into is that for some reason, a few of my users didn’t have their 4 digit code in the pager field, and I wanted to go in and update them. There are a lot of ways to do this with PowerShell, reporting, and such, but I wanted to use the Active Directory Users and Computers to manage this. As you read I did need to use Powershell to set things up. This post just like most are for me to find later on Google when I run into this problem again. Hi Jason, glad you found this post.


I had no idea but you can actually change what columns show up in ADUC, who knew?! (I'd imagine many people but lets explore together.) ADUC stores the columns in something called.. extraColumns. You can edit these extraColumns using the ADSI Edit tool.

Sign in to a domain controller and go to ADUC (Active Directory Users and Computers) and click Add/Remove Column you'll see a list of columns you can select from but the one I wanted "pager" isn't listed.

  • Open Administrative Tools or type adsiedit.msc in the Windows Search
  • Start ADSI Edit
  • Right-click ADSI Edit in the left pane and select Connect to
  • Select Configuration in the well known Naming Context
  • Click OK

Using the left pane navigate to the following:

CN=organizationalUnit-Display,CN=409,CN=DisplaySpecifiers,CN=Configuration

What is 409? it's the English language code you'll need to know what the code is for the language you are managing.

Right-click CN=organizationalUnit-Display and click Properties.

Find the attribute extraColumns. By default, it’s empty, and the value is not set.

Add the below value to the attribute extraColumns to display the Mobile in Active Directory.

pager,Pager,0,150,0

These fields are defined as follows

ldapdisplayname,column header,default visibility,width,unused
ValueDescription
ldapdisplaynameContains a string that represents the ldapDisplayName of the attribute.
column headerContains a string that represents the text displayed in the header for the column.
default visibilityContains a numeric value that is 0 if the attribute is hidden by default or 1 if the attribute is visible by default.
widthContains the width of the column in pixels. If this value is -1, the width of the column is set to the width of the column header.
unusedUnused. Must be zero.

You could just add that field to the extraColumns and be done but you'll lose all the other fields that were usually in that. How silly! To fix that I started doing some research on what can you do to capture the current fields and add them to the new one we want. I found a post that outlines this and wanted to share it here Add additional columns in Active Directory - Copy extraColumn values you'll need to run this code to grab the existing and copy it over to where your new value, in my case pager so I can have pager as well as the standard values. odd it's called extraColumns and not overrideColumns because it should be.

$Language = 409
$Config = (Get-ADRootDSE).configurationNamingContext
$ouDisplaySpecifier = Get-ADObject -Identity "CN=organizationalUnit-Display,CN=$Language,CN=DisplaySpecifiers,$Config" -Properties *
$defaultDisplaySpecifier = Get-ADObject -Identity "CN=default-Display,CN=$Language,CN=DisplaySpecifiers,$Config" -Properties *
$extraColumns = $ouDisplaySpecifier.extraColumns
$extraColumns += $defaultDisplaySpecifier.extraColumns
Set-ADObject $ouDisplaySpecifier -Replace @{extraColumns=$extraColumns}

If you read the rest of that post which us not something I needed you can do this in many other places in AD which is nice.