# Get targetAddress attribute for a bunch of users
#
# $csv = Import-Csv "c:\Temp\UserList.csv" 
# foreach ($record in $csv)
# {
# $record = Get-QADUser  -Properties * | select targetAddress |Export-Csv "c:\Temp\UserTargetAddList2.txt" 
# }
###############################


#Import-Csv c:\Temp\UserList.csv | %{ Get-QADUser -User $_.SamAccountName } |Export-Csv "c:\Temp\UserTargetAddList2.txt"

$ImportFile = gc "C:\Scripts\Input\GetuserFullName.txt" |


foreach $user in $importfile {

Get-ADUser -SizeLimit 0 -Properties *
} | Select Name,SAMAccountName,mail,TargetAddress,@{N="Tgt Match Eml";Expression={$newCol}},extensionAttribute4,`

extensionAttribute5,extensionAttribute6,extensionAttribute13,@{n="ProxyAddresses";e={[string]::join(";",$_.proxyaddresses)}} `











#$user = Import-Csv "c:\Temp\UserList.csv" | % {Get-QADUser $_.User | Get-QADUser -ObjectAttributes @{targetAddress="SMTP:$($_.targetAddress)"}} |Export-Csv "c:\Temp\UserTargetAddList2.csv"
#get-qaduser | where{$_.targetAddress} | format-table displayname

#$Target = "ud1.utility/Accounts" 
#Get-QADUser -SearchRoot $Target `
#| Get-QADUser igbia01 -Properties * |select targetAddress |Export-Csv "c:\Temp\UserTargetAddList2.txt"