Display should be First name + Last name

Welcome Forums General PowerShell Q&A Display should be First name + Last name

Viewing 1 reply thread
  • Author
    Posts
    • #197858
      Participant
      Topics: 3
      Replies: 2
      Points: 17
      Rank: Member

      Hi Guys,

      I have changed my last names to capitals and its not effecting in display name

      I run the below script made the changes in AD lastnames

      $targetUsers = Get-ADuser -SearchBase "OU=India,DC=study,DC=com" -Filter {Surname -Like "*"} | Select DistinguishedName, Surname
      $targetUsers | foreach-object {

      set-aduser $_ -Surname $_.surname.toupper()
      }

      now i want to change Display name as first + Last name.

      Present Display Name is : kiran manne

      So My Display name should be like = kiran MANNE

    • #197897
      Participant
      Topics: 10
      Replies: 1381
      Points: 1,509
      Helping Hand
      Rank: Community Hero

      There is a DisplayName attribute, which you set with Set-ADUser. The actual object name can be updated with Rename-ADObject.

      • This reply was modified 1 week, 4 days ago by Rob Simmers.
Viewing 1 reply thread
  • You must be logged in to reply to this topic.