Get-QADUser -SearchRoot ud1.utility/Accounts | ForEach-Object ($_.samaccountname) {$email = $_.Samaccountname +"@domain.com" ; Get-QADUser -ObjectAttributes @{targetAddress=$email} -Identity $_.SamAccountName -whatif} | Export-Csv -NoTypeInformation -Path "c:\Temp\UserTargetAddList2.txt"