$users.ForEach{ Try{ # Find the user to update $ADUser = Get-AzureAdUser -SearchString $_.name # Update the job title Set-AzureAdUser -ObjectId $ADUser.ObjectId -JobTitle $_.jobtitle } Catch{ Write-Host ("Failed to update " + $($_.name)) -ForegroundColor Red } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter