Add Custom attributes
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
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
- 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 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