Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Logon name required

$
0
0

I have a legacy email list given to me and it contains email address only in text document.

I need to use this information to export logon name from AD out to text or csv file so I can then use this information to populate new distribution list. Bit stuck at the moment.

I have tried unsuccessfully :

$users = Import-Csv c:\temp\file.csv
outUsers = @()
Foreach ($user in $users)
{
$outUsers += Get-Mailbox $user | Select-Object PrimarySmtpAddress ,Alias
}
$outUsers | Export-Csv c:\temp\UserLogon.csv -NoTypeInformation


Yasar


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>