Hi @Anonymous ,
first of all: Please use the Code Sample option (the icon with the 101010) to post code.
The editor of Q&A is screwing up the code if posted as normal text.
Please try this:
Import-Module ActiveDirectory
Import-CSV -Path "C:\Users\jlopez\OneDrive - APC\Desktop\Icons\mngimport\10.29.2021- APC Corp List.csv" | Foreach-Object {
# properties from the csv
$mail = $_.email
$title = $_.jobtitle
$mail
$title
Get-ADUser -Filter "mail -eq '$mail'" -Properties * | Set-ADUser -Title $title
}
$mail
and $title
should show the values of the csv line.
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten