Replace Job Title Of All Users In AD With Their Description via PowerShell

This one saved me a lot of work. We had a customer who had used their Description field for job titles due to the way their signature manager was configured. When we migrated them to Office 365 we had to get these moved into the Job Title field for Exclaimer to pull from. The below attributes can be amended to any AD attribute.

I use Foreach loops with scripts like these to prevent the script from taking an age to run and also reduce memory usage. I have found doing these without such loops can cause PowerShell to hang and white out.

$Users = Get-ADUser -Filter { Description -like ‘*’ } -SearchBase “DC=contoso,DC=local” -Properties *

 Foreach ($User in $Users)

 {

 Write-Host Setting $User.DisplayName Job Title to $User.Description

 Set-ADObject -Identity $User.DistinguishedName -Replace @{ Title = $User.Description }

 }

 Write-Host Done Thanks PCQuickTips.Net!

Tagged : / / / /