I need help with Powershell and importing Active Directory data from a CSV file to actual user accounts

I just received help pulling active directory data from users in a specific OU into a CSV file. I now have a report of everyone's email address and phone number and am aware of the users that are missing those fields. I was hoping I could use the same CSV file to make modifications to the telephone and email columns and import the data back into active directory. In other words all our of active directory users need to have telephone numbers and email addresses on the General Tab, but some are missing. I hope to fill in the missing information on the CSV file and import it into active directory so I will not have to open and modify each individual ADUC account. Is there a powershell command that will let me do this? Below is basically the script I used to create the results.csv file. How can I fill in the blank data and get it back into AD?

 
Import-module activedirectory
Get-ADUser -Filter * -SearchBase "ou=dallasusers,ou=dallas,ou=texas,dc=youdomain,dc=com" -Properties DisplayName, Mail, TelephoneNumber |
? { ($_.TelephoneNumber -ne $null) -aor ($_.Mail -ne $null) } | select DisplayName, mail, telephonenumber |
Export-csv "c:\results.csv" -nti
LVL 1
Thor2923Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dan_blagutCommented:
Hello

Here you can find an example more complex. you can use it like it is if you want to update all fields, or comment the fields that you don't need
https://gallery.technet.microsoft.com/scriptcenter/PowerShell-script-to-376e9462
ANd if you want more, then you can use the module
https://gallery.technet.microsoft.com/PowerShell-Function-to-e1eb6441

Dan

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.