PowerShell Management Series (10) Management of mail contacts and mail users

Source: Internet
Author: User

Given that some users are not familiar with the differences between mail contacts and mail users, Bowen first introduces the concept of user mailboxes, mail contacts, mail users, and the following sections of the blog Digest from winos Microsoft Chinese Technology Forum.

-----------------------------------------------------------------------------------------------------

a) user mailbox : The most common should be this. We have a mailbox enabled for a domain account, so this user's mailbox is a typical recipient. User mailboxes typically contain messages, calendar items, contacts, tasks, and other important business data that occupy the storage space of the Exchange database. is to create a user mailbox:
650) this.width=650; "id=" aimg_86399 "style=" HEIGHT:583PX;WIDTH:706PX; "alt=" 1. New mailbox 1.png "Src=" http://bbs.winos.cn/ Attachments/month_1411/14110223348f957094a519e128.png "width=" 637 "height=" 532 "/>
650) this.width=650; "id=" aimg_86400 "style=" HEIGHT:573PX;WIDTH:707PX; "alt=" 2. New mailbox 2.png "Src=" http://bbs.winos.cn/ Attachments/month_1411/1411022334836b9390a50bf720.png "width=" 637 "height=" 529 "/>
Note: Careful you must have captured some key information, right? Creates a domain account that consumes storage space (because a database needs to be specified).

b) Mail contact : In AD, its object type is the contact, not the user. It is used to represent an external user, the mail contact has an external e-mail address, and all messages sent to the mail contact will be sent to the external e-mail address, so it does not occupy the storage space of the Exchange database. is to create a mail contact:
650) this.width=650; "id=" aimg_86401 "style=" HEIGHT:566PX;WIDTH:706PX; "alt=" 3. Create a new mail contact. png "src=" http:// Bbs.winos.cn/attachments/month_1411/141102233402d24a7972652add.png "width=" 636 "height=" 531 "/>
Note: No domain account was created and storage space was not used (because we didn't have to specify the database at all).

c) Mail users : As with user mailboxes, but unlike mail contacts, in AD, it is the user, not the contact, of the object type. Since it is an ad user, then it must have a domain account, have the domain account description has the ad login rights, also has the ability to access resources, such as shared folders. Mail users It is also used to represent external users. The Mail user has an external e-mail address, and all messages sent to the mail contact are sent to the external e-mail address, so it does not occupy the storage space of the Exchange database. is to create a mail user:
650) this.width=650; "id=" aimg_86402 "style=" height:591px;width:708px; "alt=" 4. New mail user 1.png "src="/HTTP/ Bbs.winos.cn/attachments/month_1411/141102233419a3bb8d4609280c.png "width=" 637 "height=" 531 "/>
650) this.width=650; "id=" aimg_86403 "style=" height:602px;width:708px; "alt=" 5. New Mail user 2.png "src="/HTTP/ Bbs.winos.cn/attachments/month_1411/1411022334ea955dca3f8d3e9c.png "width=" 636 "height=" 531 "/>
Note: A domain account was created, but no storage space was consumed.

In Active Directory Users and Computers, we can see clearly what type of AD object The three recipients correspond to:650) this.width=650; "id=" aimg_86404 "style=" height:437px;width:713px; "alt=" 6. Mailbox-Contact-User _ type comparison. png "src="/HTTP/ Bbs.winos.cn/attachments/month_1411/1411022334437b265269855c85.png "width=" 744 "height=" 419 "/>
Note: mailbox corresponding to the user mailbox, mailuser corresponding to the mail user, mailcontact corresponding mail contact.

The difference between the three recipients can be clearly seen from the table I summarized below:650) this.width=650; "id=" aimg_86405 "style=" height:112px;width:661px; "alt=" 7. Mailbox-Contact-User _ Compare table. png "src="/HTTP/ Bbs.winos.cn/attachments/month_1411/141102233462f6271591736a30.png "width=" 674 "height=" 107 "/>

In addition to the above few recipients, Exchange contains many other recipients. For example: Distribution groups, device mailboxes, room mailboxes, shared mailboxes, and so on, all of which meet the "ability to send or receive mail" feature. There is no explanation for this, but it is interesting to check TechNet yourself.

---------------------------------------------------------------------------------------------------

Demand:

Companies and some dealers often have business mail, many company colleagues need to contact them often, so we need to bulk new contacts, and according to different company name into different OU.

Step 1, first set up a different OU. such as Zhuhai Sky Information Technology Co., Ltd., Zhuhai Lian Bang Network Technology Co., Ltd., United Shun Information Technology Services (Shanghai) Co., Ltd., Dongguan Computer Technology Co., Ltd.

650) this.width=650; "title=" 1.png "style=" HEIGHT:467PX;WIDTH:709PX; "src=" http://s3.51cto.com/wyfs02/M02/58/B9/ Wkiom1s5hl3z7rrraai3jjgzcqw859.jpg "width=" 844 "height=" 602 "alt=" wkiom1s5hl3z7rrraai3jjgzcqw859.jpg "/>

Step 2, build a list of contact lists, for the subsequent batch import to prepare. To avoid Chinese garbled after importing, note that Excel file encoding is saved as UTF8.

650) this.width=650; "title=" 1.png "style=" height:529px;width:708px; "src=" http://s3.51cto.com/wyfs02/M00/58/B9/ Wkiom1s5krqbjydvaapupluhigq070.jpg "width=" 853 "height=" 578 "alt=" Wkiom1s5krqbjydvaapupluhigq070.jpg "/>

Step 3, perform the bulk Import contact command, the command is as follows:

[PS] C:\users\administrator.rightdo\desktop>import-csv-path C:\mailcontact.csv | foreach {new-mailcontact-name $_.name-displayname $_.displayname-alias $_.alias-externalemailaddress $_. Externalemailaddress-organizationalunit $_.organizationalunit}

[Note: The middle error is due to the presence of a contact.]

650) this.width=650; "title=" 1.png "style=" HEIGHT:458PX;WIDTH:709PX; "src=" http://s3.51cto.com/wyfs02/M00/58/B7/ Wkiol1s5nltcxt4uaaqbdugtqiw862.jpg "width=" 997 "height=" 539 "alt=" wkiol1s5nltcxt4uaaqbdugtqiw862.jpg "/>

Check to see if the email contact list is set up correctly.

650) this.width=650; "title=" 1.png "style=" height:494px;width:710px; "src=" http://s3.51cto.com/wyfs02/M00/58/B9/ Wkiom1s5ni-qv6d7aag7dfuxymk705.jpg "width=" 933 "height=" 614 "alt=" Wkiom1s5ni-qv6d7aag7dfuxymk705.jpg "/>

Step 4, continue to import mail contact organization information, contact details, etc. The command is as follows:

TechNet Description: set-contact cmdlets modify settings for contact objects that are visible in Active Directory users and Computers

So we're going to use set-contact to set the contact properties

[PS] C:\users\administrator.rightdo\desktop>import-csv-path C:\mailcontact.csv | foreach {set-contact-identity $_.alias-stateorprovince $_. Stateorprovince-city $_.city-mobilephone $_. Mobilephone-title $_.title-department $_. Department-company $_.company}

650) this.width=650; "title=" 1.png "style=" height:435px;width:712px; "src=" http://s3.51cto.com/wyfs02/M01/58/B7/ Wkiol1s5oakhl8eiaafucm6nxem272.jpg "width=" 992 "height=" 536 "alt=" Wkiol1s5oakhl8eiaafucm6nxem272.jpg "/>

Step 5, see if the modified property is in effect

650) this.width=650; "title=" 1.png "style=" HEIGHT:499PX;FLOAT:NONE;WIDTH:709PX; "src=" http://s3.51cto.com/wyfs02/ M00/58/b7/wkiol1s5ohrai5o6aaf4_81nwvm312.jpg "width=" 1026 "height=" 628 "alt=" wkiol1s5ohrai5o6aaf4_81nwvm312.jpg "/ >

650) this.width=650; "title=" 2.png "style=" HEIGHT:480PX;FLOAT:NONE;WIDTH:709PX; "src=" http://s3.51cto.com/wyfs02/ M01/58/ba/wkiom1s5ouvcwyw_aadu6qzfsyy475.jpg "width=" 858 "height=" 556 "alt=" wkiom1s5ouvcwyw_aadu6qzfsyy475.jpg "/ >

This article is from the "Zhou Ping Microsoft Technology Exchange Platform" blog, please be sure to keep this source http://yuntcloud.blog.51cto.com/1173839/1604928

PowerShell Management Series (10) Management of mail contacts and mail users

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.