PowerShell bulk modifies Aduser's displayname properties

Source: Internet
Author: User

scenarios, Requirements:

With the current expansion of the company's scale, originally only the Chinese name for the Aduser in the DisplayName attribute value phenomenon, has been in and foreign personnel exchanges have an impact. Cause the foreign personnel cannot recognize Aduser's displayname information. We know that regardless of exchange or SFB, their display name gets the DisplayName value.

First Export-csv-path | Get-aduser Export and modify information to preserve the required columns.

$file = Import-csv C:\users\administrator\desktop\alluser1.csvforeach ($data in $file) {$samaccount = $ Data.samaccountname$displayname = $data. Displaynameset-aduser-identity $samaccount-displayname $displayname}

Ideas:

This is mainly the Set-aduser-identity-displayname command and the Foreach usage method.


PS: This is my first blog post, we encourage each other together.

This article is from the "deep Sea One Tail Fish blog" blog, please make sure to keep this source http://5496038.blog.51cto.com/5486038/1855510

PowerShell bulk modifies Aduser's displayname properties

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.