bulk designation update powershell from DisplayName

thili koda 1 Reputation point
2021-09-26T19:19:06.447+00:00

Hi All.

I have got a CSV that includes Display name and Title only, and I need to change Title accordingly to displayName can you please help me with Powershell.

Windows for business | Windows Server | User experience | PowerShell
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 39,926 Reputation points
    2021-09-28T07:40:06.183+00:00

    Hello @thili koda

    I would try something like this:

    Import-CSV -Path C:\myUsers.CSV | Foreach-Object {  
      
        $DisplayName  = $_.DisplayName  
        $title = $_.jobtitle  
        Get-ADUser -Filter {(Displayname -eq "$DisplayName")} | Set-ADUser -Title $title  
    

    Hope this helps with your query,

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

    --If the reply is helpful, please Upvote and Accept as answer--


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.