Isso não foi testado, mas deve levá-lo na direção certa.
$peeps = get-aduser -filter * -properties department
for-each ($person in $peeps){
##Checks Department and sets new email
if ($person.department -eq "building"){$email = $person.firstname+'.'+$person.surname +'@buildings.com'}
elseif ($person.department -eq "otheroption"){$email = $person.firstname+'.'+$person.surname +'@whatever.com'}
##Changes existing email addresses to aliases and sets new email from above as primary
$person.user = $user
$smtp=get-aduser $user.samaccountname -properties proxyaddresses |select-object proxyaddresses
$newsmtp = @()
foreach($addr in $smtp.proxyaddresses){
if ($addr -notmatch $email -and $addr -cmatch "SMTP"){
$newsmtp = $newsmtp + $addr.replace("SMTP","smtp")
}
elseif ($addr -notmatch $email -and $addr -cnotmatch "SMTP"){$newsmtp = $newsmtp + $addr}
}
$emailproxy = 'SMTP:'+$email
$newsmtp = $newsmtp + $emailproxy
set-aduser $user.samaccountname -replace @{proxyaddresses=@($newsmtp)}
}