Cannot assign multi-line values to CustomAttributes with Set-Mailbox
Posted
by
Biglig
on Server Fault
See other posts from Server Fault
or by Biglig
Published on 2011-01-10T17:06:57Z
Indexed on
2011/01/10
17:55 UTC
Read the original article
Hit count: 181
active-directory
|exchange-2007
A colleague is implementing an application that generates signatures and publishes them to Outlook. It would be useful to him if I could store a multi-line string for each user in Active-Directory.
Using one of the Custom-Attributes seems obvious, but if I try
set-mailbox biglig -CustomAtribute1 "First Line``r``n Second Line"
then CustomAttribute1 gets set to "FirstLineSecondLine" and looses the breaks. However, the same syntax works fine when I set e.g. StreetAddress or Notes. Of course, those are changed with set-user rather than set-mailbox. According to Technet's reference for set-user and set-mailbox, The CustomAttributes, StreetAddress, and Notes all take a system.string as their value.
Is it just the case that some attributes accept multi-line strings and some don't? If so, can anyone suggest a workaround?
© Server Fault or respective owner