list of all users by SMTP address
Hello,I need to get a list of all users in my organization that have email addressending by@domain001 and domain002 + to extract that list in a xls file.Eg: user1@domain001.fruser2@domain001.comuser1@domain003.fruser1@domain002.fruser1@domain002.esFrom the above users I should only get the 3 below users:user1@domain001.fruser2@domain001.comuser1@domain002.frI can not find the shell command for that! Can you please help me??
July 21st, 2009 2:03pm
Sorry forgot to mention that I am using Exchange 2007
Free Windows Admin Tool Kit Click here and download it now
July 21st, 2009 2:08pm
I hope the below Powershell will fulfill your requirements http://objectmix.com/microsoft-exchange/303935-exchange-2007-get-mailbox-syntax.html
Vinod
|CCNA|MCSE 2003 +Messaging|MCTS|ITIL V3|
July 21st, 2009 2:23pm
Thanks for the link but in fact I also have Linux mailboxes that are created as contact in the Exchange manag console.Can I just get the list of all users (Alias + fisrt lastname) + smtp addresses ??
Free Windows Admin Tool Kit Click here and download it now
July 21st, 2009 4:03pm
Yep the same link will also extract other smtp addresses tryout and let me know
Vinod
|CCNA|MCSE 2003 +Messaging|MCTS|ITIL V3|
July 21st, 2009 4:21pm
Hi,Try the below poweshell command. Hope it helpsGet-Mailbox -ResultSize Unlimited | select DisplayName, Alias |export-csv C:\stats.csv$csv = Import-csv -path "C:\stats.csv"foreach($line in $csv){ $result = $Line.Alias$Emailadd = Get-Mailbox $Line.Alias |select emailaddresses$K = $Emailadd.EmailAddresses
foreach ($S in $K){If (($S.smtpaddress -like "*domain001.fr") -or ($S.smtpaddress -like "*@domain001.com")){$result = $result + "," + $S.smtpaddress}}$result | Out-File C:\Result_output.csv -Append
}Regards,Krishnahttp://smtpport25.wordpress.com/
Free Windows Admin Tool Kit Click here and download it now
July 21st, 2009 6:09pm