Share via

Set Job Title Using PowerShell

Anonymous
2021-12-08T15:51:17+00:00

I'm trying to write a PS script to update the job title for users in AD. I was given a CSV file with a list of users email address and I'm using that.

This is what my CSV file looks like:

"ProfessionalEmail","Job Title"

"******@email.com"," A POS"

This is what my script looks like.

Import-Module ActiveDirectory

Import-CSV -Path "pathforfile.csv" | Foreach-Object {

properties from the csv

$mail = $_.ProfessionalEmail

$title = $_.Job Title

Get-ADUser -Filter {(mail -eq "$mail")} | Set-ADUser -Title $title

}

Update:

After running the scrip, PS does not return feedback and the AD attribute does not update for job title. Anyone know what im missing?

Windows for home | Windows 10 | Settings

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Anonymous
    2021-12-08T19:49:12+00:00

    thanks! I will open that in a separate forum.

    Was this answer helpful?

    0 comments No comments
  2. David-M 115.4K Reputation points Independent Advisor
    2021-12-08T17:02:00+00:00

    Hi, I'm David.

    It seems you are talking about a corporate environment. I suggest that you access the link below, which will direct you to the Microsoft Q&A page.

    https://docs.microsoft.com/en-us/answers/index....

    Microsoft Q&A has IT professionals and system admins who can best help you with this type of question.

    The Microsoft Community is a forum for home users.

    Best regards.

    Was this answer helpful?

    0 comments No comments