How to store text in AD attributes of type String(Unicode)

In our company, we store the name of the building in which an employee works in one of the ActiveDirectory attributes named extensionAttribute# where # represents a number form 1-15.  I want to be able to store the names of buildings in the AD attribute named "buildingName". According to the buildingName attribute in the MSDN library, the syntax is "String(Unicode)".

buildingName attribute -

String(Unicode) syntax -

When I try something that seems simple to write some text into this attribute such as

Set-QADUser jdoe -ObjectAttributes @{buildingName="My Building Name"}

I get an error that says "Set-QADUser : The requested operation did not satisfy one or more constraints associated with the class of the object."


I have been searching forums and code libraries for a solution to this issue, but I do not understand why I can't store string data into this attribute. I did try the following code snippets to try to convert the string to Unicode (and UTF-8) before I wrote to the buildingName attribute, but I still get the same error.

$text = "My Building Name"
= [System.Text.Encoding]::Unicode
# $enc = [System.Text.Encoding]::UTF8
= $enc.GetBytes($text)
Set-QADUser jdoe -ObjectAttributes @{buildingName=$encText}

Has anyone else had this issue or know how to overcome it? I can, of course, continue to use the extensionAttribute in which I currently have the data stored, but I really want to free it up and use the "buildingName" attribute.

No Data
  • Older topic, but just recently came across some questions relating to this specific attribute. We were trying to figure out what object classes implemented this attribute, but we've not found any. I've been trying the following LDAP query of the Schema container in LDP:


    This query comes up with zero results - not a single objectClass that implements this particular attribute. Found some reference in other Google results that suggested this was an attribute of an orginazationalUnit, but found this to be untrue. Seems to be an odd, unreferenced attribute. Makes me wonder how many other attributes are defined but unused...

No Data