Powershell Exchange Adding attributes to current identities
Hey there. Now listen, I have a problem with Powershell. So we have groups and members already part of out Exchange community, but what I need to do is apply year levels to each individual student. The student names are already in Exchange with some information,
and I have done up a CSV of their names and year levels and imported it with powershell, but I can't merge the information. I have a seperate CSV of names and year levels and all the current names and data in exchange. All I want to do is apply the year level
to the person, can you help?
Thanks, Sleepy
October 26th, 2010 11:14pm
Where do you want to apply the year level?Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
Free Windows Admin Tool Kit Click here and download it now
October 26th, 2010 11:34pm
Where do you want to apply the year level?
Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
I guess in a custom attribute. I don't know anywhere else it would be suitable. I've titled the column with the yearlevels in the CSV as CustomAttribute7. Tell me it's easy?
October 27th, 2010 12:04am
Assuming your .csv is c:\somedir\year_levels.csv, and has column headings of "name" and "year_level":
$recs = import-csv c:\somedir\year_levels.csv
foreach ($rec in $recs){
set-mailbox $rec.name -customattribute7 $rec.year_level
}
Adjust as necessary. Avoid column headings with embedded spaces if you can, if there are any you'll have to quote those property names in the script.[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Free Windows Admin Tool Kit Click here and download it now
October 27th, 2010 6:49am