PowerShell passes custom attributes in Exchange (employee number, etc.)

Source: Internet
Author: User

First of all, this article is a little bit related to the previous article, we can get some employee properties from the domain, but these properties are not displayed in exchange, this time, you can do something to write some specific properties to the employee's "Custom Properties" in Exchange.

In real-world cases, this approach can present specific information , such as displaying a specific title for a user, whether professional or entertaining, as well as specific information to facilitate future screening and grouping.

Import-module activedirectory$adyh = "Zhangpengliang" $epm = (get-aduser-identity $adyh-properties *). EmployeeNumber set-mailbox-identity $adyh-customattribute4 $epmGet-mailbox-identity $adyh |select CustomAttribute4

The code is very small, altogether 5 lines, first this thing needs to run in the PowerShell of exchange, then we need to import the Active Directory module, then we just need to set a property, that is the employee name.

The third line is to take the employee's employee number attribute (this is a property within the domain), and then we set the value in the employee's 4th custom attribute, and the last line is displayed.


Very simple example. With the Exchange Toolbox → details template editor, you can display specific information on the client side

Similarly, loops are very well written, not described here.


In addition, if the property is extended in the schema, the creation of their own fields, the configuration will be a little more cumbersome, we introduce the array when the next time to explain

This article is from the "Nine uncle-Microsoft Private Cloud" blog, please make sure to keep this source http://jiushu.blog.51cto.com/972756/1663297

PowerShell passes custom attributes in Exchange (employee number, etc.)

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.