OK ... so this doing my head in ... probably have stared at it too much
Trying to Add / Change a couple of AD attributes through a PS Script to save me having to individually edit numerous users
Have Csv with following columns : User Company Department Manager
Script is as follows :
but all it seems to do is list the users and not change the attributes
Any pointers gratefully accepted
Cheers
<Do I need A Signature or will an X do?>
Trying to Add / Change a couple of AD attributes through a PS Script to save me having to individually edit numerous users
Have Csv with following columns : User Company Department Manager
Script is as follows :
Code:
Import-Csv "C:\temp\update.csv"
foreach ($user in $users) {
Get-ADUser -Filter "SamAccountName -eq '$($user.User)'" -Properties * |Set-ADUser -department $($user.department) -title $($user.title) -company $($user.Company)
}
but all it seems to do is list the users and not change the attributes
Any pointers gratefully accepted
Cheers
<Do I need A Signature or will an X do?>