Tuesday, November 12, 2013

Update Display Name, Name, Initials etc–PowerShell Script

Here is a PowerShell V2.0 script which you can use to update Display Name, Name, Initials etc.  Of course you can change or select different attributes as needed.  You can get attribute derails from here - http://portal.sivarajan.com/2010/07/aduc-and-ldap-reference-sheet.html

In this script, I am updating display name in LastName, FirstName (Initial) format.  Initial is the first characters from First and Last name.  You can change this logic by modifying the following code:

$Ufname = $Uinfo.GivenName
$ULname = $Uinfo.Surname
$CurrentDispalyName = $Uinfo.Displayname
$NewInitial = $Ufname[0]+$ULname[0]
$NewInitial = $NewInitial.toupper()
$NewDisplayname = $ULname + ", " + $Ufname + " (" + $NewInitial + ")"

Also, I am using an input file with samaccountname.  You can select an OU instead of an input file.

image

Output file (DisplayName_Output.txt) will have the Current Display Name, New Display name and New Initials information.

Script  can be downloaded from the following location:

image

1 comments:

Navigating the intricate landscape of tax preparation can often be a daunting task, but with the right tools and guidance, you can ensure that you're not leaving any potential tax savings on the table. "How To Claim Your Maximum Tax Refund with TurboTax" is a comprehensive guide designed to empower individuals with the knowledge and tools they need to maximize their tax refund using one of the most trusted tax preparation software platforms available.

Post a Comment

Popular Posts

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More