Ask a questionAsk a question
 

AnswerAdd Custom attributes

  • Monday, November 30, 2009 6:11 PMGraiggoriz Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hello,

    In my "organization" we have 20% of Exchange accounts (Exch sever 2007)and 80% Linux Accounts.

    The Linux accounts are mail contact (New mail user & New mail contact).

    1- I need to add in the Mailbox User Properties in Custom attributes 2 the mention "LINUX" for the mail contact (New mail user & New mail contact).

    2- And need to do the same with all the mailbox but add the mention "EXCHANGE"
    http://media.techtarget.com/digitalguide/images/Misc/bg_ch03_10.jpg

    Does anyone know a shell command that would do the job??

    Thanks in advance

Answers

  • Tuesday, December 01, 2009 7:26 AMV I S H A L Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    1- I need to add in the Mailbox User Properties in Custom attributes 2 the mention "LINUX " for the mail contact (New mail user & New mail contact).
    Do you mean to say MailContacts User Properties?

    Just query all Mailcontacts and MailUsers from AD with CmdLets and pipe the result to Set-MailContact and Set-MailUser. try below for Contacts and for MailUsers

    Get-MailContact -ResultSize Unlimited | Set-MailContact -CustomAttribute2 "LINUX"
    Get-MailUser -ResultSize Unlimited | Set-MailUser -CustomAttribute2 "LINUX"


    and For mailbox to fix CA2 as Exchange...

    Get-Mailbox -ResultSize Unlimited | Set-Mailbox -CustomAttribute2 "EXCHANGE"

    Hope This helps.
    Thanks.


    Vishal Ramnani | MCITP - Exchange 2007 | MCSE Messaging | MCTS - Win 2008 Config
    • Marked As Answer byGraiggoriz Tuesday, December 01, 2009 7:54 AM
    •  

All Replies

  • Monday, November 30, 2009 6:52 PMRajnish R Sharma Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi,

    So this is the 2nd part of your earlier query of making DLs for linux users.

    Have a look into this http://blogs.technet.com/isingh/archive/2007/02/18/adding-custom-attributes-in-active-directory.aspx.

    Also make sure you back your registry before making any changes.

    Not sure but can have a look into this also.

    http://forums.techarena.in/active-directory/1192191.htm

    Raj
  • Tuesday, December 01, 2009 7:26 AMV I S H A L Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    1- I need to add in the Mailbox User Properties in Custom attributes 2 the mention "LINUX " for the mail contact (New mail user & New mail contact).
    Do you mean to say MailContacts User Properties?

    Just query all Mailcontacts and MailUsers from AD with CmdLets and pipe the result to Set-MailContact and Set-MailUser. try below for Contacts and for MailUsers

    Get-MailContact -ResultSize Unlimited | Set-MailContact -CustomAttribute2 "LINUX"
    Get-MailUser -ResultSize Unlimited | Set-MailUser -CustomAttribute2 "LINUX"


    and For mailbox to fix CA2 as Exchange...

    Get-Mailbox -ResultSize Unlimited | Set-Mailbox -CustomAttribute2 "EXCHANGE"

    Hope This helps.
    Thanks.


    Vishal Ramnani | MCITP - Exchange 2007 | MCSE Messaging | MCTS - Win 2008 Config
    • Marked As Answer byGraiggoriz Tuesday, December 01, 2009 7:54 AM
    •