I have a problem with this little script
$adress = Get-Content C:tempkons.txt
ForEach-Object {
$adressto = "$adress@adress.local"
get-aduser -Filter {mail -like $adressto}}
When i have one name in C:tempkons.txt it works
$adress will be user1@adress.local
When i have 2 names in it dont work
$adress will be user1 user2@adress.local
Can anyone see the error ?