Hi everyone,
Today we received a CSV with 2k users to change their AD Attributes.
Something like that:

The CSV was already exported and I need to import those informations to their Attributes.
I Tried some scripts but, none of them worked.
Does anybody here has an basic idea of a script that could help me?
Scripts that already tried:
Import-Module ActiveDirectory
$USERS = Import-CSV ""
$USERS|Foreach{
Get-ADUser -filter {name -eq $.name}|Set-ADUSer -MobilePhone $.MobilePhone -StreetAddress $.StreetAddress -City $.City -Title $_.Title}
And
Import-module ActiveDirectory
$users = Import-Csv "C:\ad_import\users.csv"
foreach ($user in $users) {
$props = @{
identity = $user.samaccountname
givenName = if($user.FirstName ){$user.FirstName }else{$null}
surname = if($user.LastName ){$user.LastName }else{$null}
title = if($user.JobTitle ){$user.JobTitle }else{$null}
description = if($user.description){$user.description}else{$null}
state = if($user.State ){$user.State }else{$null}
Office = if($user.Office ){$user.Office }else{$null}
department = if($user.Department ){$user.Department }else{$null}
city = if($user.City ){$user.City }else{$null}
manager = if($user.manager ){$user.manager }else{$null}
company = if($user.company ){$user.company }else{$null}
}
set-aduser @props
}
The structure of CSV is:

